FileLogger

The FileLogger class is a logger implementation that logs messages to a file.

The FileLogger class is a logger implementation that logs messages to a file.

Properties

PropertiesDescription
filteropen override val filter: LogLevel

Functions

MethodDescription
logLogs a message to the file.
shouldLogDetermines whether the logger should log a message based on the log level

log

Logs a message to the file.

Syntax: open override fun log(level: LogLevel, tag: String?, msg: String?, tr: Throwable?)

Parameters

ParameterDescription
levelThe log level of the message.
tagThe tag for the log message.
msgThe log message.
trThe optional throwable is associated with the log message.

shouldLog

Determines whether the logger should log a message based on the log level.

Syntax: open override fun shouldLog(level: LogLevel): Boolean

Return Value True if the logger should log the message, false otherwise.

Parameters

ParameterDescription
levelThe log level to check.