LogWriter

interface LogWriter

A LogWriter represents a destination or a mechanism for handling log messages. For example, a LogWriter might print messages to the console, write them to a file, or send them over the network.

Implementations should be lightweight and fast.

Inheritors

Functions

Link copied to clipboard
open fun close()
Link copied to clipboard
abstract fun isLoggable(level: LogLevel): Boolean

Determines if this writer is willing to handle messages with the given level.

Link copied to clipboard
abstract fun write(level: LogLevel, domain: String, message: String)

Writes the log message. If isLoggable returned false, this method should ideally never be called, but if it is, it should no-op.