Created
October 15, 2020 13:02
-
-
Save davidohana/46884fc438a6e14e9d38f7a2a3da5554 to your computer and use it in GitHub Desktop.
This file contains 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
val settings = KofikoSettings() | |
.addCli(args) { this.overrideToken = "-o" } | |
.addEnv() | |
.addSystemProperties() | |
.addFiles( | |
"sample_config.json", "sample_config.ini", | |
"sample_config.env", "sample_config.properties" | |
) | |
// optional setting to print config options with non-default value | |
settings.onOverride = PrintOverrideNotifier() | |
Kofiko.init(settings) | |
// configuration is ready to use | |
Logger.getLogger("test").log(LogConfig.level, "Hello Kofiko") | |
println("Database user is " + DatabaseConfig.user) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment