gnieh / logback-config Goto Github PK
View Code? Open in Web Editor NEWTypesafe config configurator for logback
License: Apache License 2.0
Typesafe config configurator for logback
License: Apache License 2.0
includedConfig.conf
with the following content to the src/test/resources:include "./asyncAppender.conf"
test.logback {
}
org.gnieh.logback.config.ConfigConfiguratorTest.testConfigureAsyncAppender()
to includedConfig.conf
Expected results: passing tests
Actual results:
java.lang.NullPointerException
at ch.qos.logback.core.joran.spi.ConfigurationWatchList.convertToFile(ConfigurationWatchList.java:93)
at ch.qos.logback.core.joran.spi.ConfigurationWatchList.addAsFileToWatch(ConfigurationWatchList.java:59)
at ch.qos.logback.core.joran.spi.ConfigurationWatchList.addToWatchList(ConfigurationWatchList.java:67)
at ch.qos.logback.core.joran.util.ConfigurationWatchListUtil.addToWatchList(ConfigurationWatchListUtil.java:68)
at org.gnieh.logback.config.ConfigConfigurator.lambda$2(ConfigConfigurator.java:342)
at java.util.Iterator.forEachRemaining(Iterator.java:116)
at org.gnieh.logback.config.ConfigConfigurator.registerFileWatchers(ConfigConfigurator.java:342)
at org.gnieh.logback.config.ConfigConfigurator.configure(ConfigConfigurator.java:163)
at org.gnieh.logback.config.ConfigConfiguratorTest.testConfigureAsyncAppender(ConfigConfiguratorTest.java:139)
...............
The problem is org.gnieh.logback.config.ConfigConfigurator.getSourceFiles(ConfigValue, Set<URL>)
. It's to naive to work as expected. The only valid way to gather files in current config library implementation is to provide the ConfigIncluder
implementation to ConfigParseOptions.prependIncluder
and pass the result to the one of ConfigFactory
static methods.
According to the logback documentation, logger library initializes itself with BasicConfigurator if no another configuration provided: no configuration file found and no Configurator provided by spi.
logback-config library provides the alternative file format support to logback, so it has to implement the same behavior: fallback to the BasicConfigurator if no hocon configuration provided (i.e., no appenders provided to the root logger after all).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.