FileLogger

object FileLogger

A file-based logger with automatic file rotation and buffering. Logs are written to /sdcard/logs/ with automatic rotation when files exceed size limits.

Types

Link copied to clipboard

Functions

Link copied to clipboard
fun clearLogs()

Clears all logs and starts fresh.

Link copied to clipboard
fun debug(tag: String, message: String)
Link copied to clipboard
fun error(tag: String, message: String)
Link copied to clipboard
fun flush()

Flushes the current log queue to file and rotates if necessary.

Link copied to clipboard
fun info(tag: String, message: String)
Link copied to clipboard
fun log(level: FileLogger.LogLevel, tag: String, message: String)

Logs a message with the specified level and tag. Messages are buffered and flushed when queue size exceeds limit.

Link copied to clipboard
fun warn(tag: String, message: String)