🔒 Secure Transmission
Utilizes AES encryption with CFB mode and key derivation for secure log data transmission.
A secure, efficient, and scalable log management solution built with Kotlin and Go
LogManagingSystem is a modern, secure log management solution designed for applications requiring reliable log collection and storage. Built with Kotlin for client-side operations and Go for the backend, it provides a robust and efficient way to handle application logs.
Utilizes AES encryption with CFB mode and key derivation for secure log data transmission.
Implements basic authentication to protect API endpoints and ensure authorized access.
Stores logs in directories based on device identifiers (IMEL) for efficient retrieval.
Go backend ensures fast and efficient log processing and storage.
Kotlin client enables easy integration with various platforms and applications.
Built-in retry logic for handling network issues and ensuring log delivery.
The Kotlin client library provides a simple and secure way to send logs to the server. Here's how to use it:
import kotlinx.coroutines.runBlocking
import org.aria.danesh.logmanagingkotlinlib.LogManagingKotlinLib
fun main() = runBlocking {
val logManager = LogManagingKotlinLib(
apiUrl = "http://your-api-host:port",
username = "your-username",
password = "your-password",
encryptionKey = "your-32-byte-encryption-key",
maxRetries = 3,
retryDelay = 1,
timeout = 30
)
val result = logManager.sendEncryptedLog(
imel = "device-identifier",
error = "Error message",
level = "ERROR",
source = "application-name"
)
result.fold(
onSuccess = { message -> println("Log sent successfully: $message") },
onFailure = { exception -> println("Error sending log: ${exception.message}") }
)
}
Add the following dependencies to your Kotlin project:
dependencies {
implementation("org.aria.danesh:logmanagingkotlinlib:1.0.0")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.0")
implementation("com.squareup.okhttp3:okhttp:4.12.0")
}
The Go backend provides a secure API for receiving and storing encrypted logs. Here's how to set it up:
# Build the API
./build.bat
# The executable will be created in build/api/LogManagingApi-windows-64.exe
The API provides the following endpoints:
# Example using curl
curl -X POST \
-H "Authorization: Basic $(echo -n 'username:password' | base64)" \
-H "Content-Type: application/json" \
-d '{"encrypted_data":"your-encrypted-data"}' \
http://localhost:8080/
We welcome contributions! Please feel free to submit pull requests or report issues on our GitHub repository.
Visit our repository: arya458/LogManagingSystem