ConsoleLogWriter
class ConsoleLogWriter(minLevel: LogLevel = LogLevel.DEBUG, formatter: LogFormatter = LogcatLogFormatter().withColor()) : LogWriter
A LogWriter that mimics the Android Logcat output style using println()
.
Messages at LogLevel.ERROR are treated as fatal. After logging, an exception is raised to mimic g_log
error behavior.
Installation Convenience Methods
For convenience, companion methods allow adding this writer conditionally:
Use Log.installConsoleLogWriterForDebugBuilds for debug builds.
Use Log.installConsoleLogWriterForReleaseBuilds for release builds.
Use Log.installConsoleLogWriter to install for both debug and release builds.
Parameters
minLevel
The minimum log level to log. Default is LogLevel.DEBUG.
formatter
An optional LogFormatter to customize the log message format. Default is LogcatLogFormatter.
Constructors
Link copied to clipboard
constructor(minLevel: LogLevel = LogLevel.DEBUG, formatter: LogFormatter = LogcatLogFormatter().withColor())