Last active
December 20, 2021 08:08
-
-
Save MFlisar/a876e75d45dfb44d5abf3a4ec4aade50 to your computer and use it in GitHub Desktop.
Lumberjack - Setup Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1) plant the console logging tree | |
L.plant(ConsoleTree()) | |
// 2) plant a file logging tree | |
val setup = FileLoggingSetup.Setup(logsToKeep = 1, fileExtension = "txt") | |
val fileLoggingSetup = FileLoggingSetup.DateFiles(context, setup) | |
// alternatively use number file names instead of date based file names if desired | |
// val fileLoggingSetup = FileLoggingSetup.NumberedFiles(context, setup) | |
L.plant(FileLoggingTree(fileLoggingSetup)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment