GithubHelp home page GithubHelp logo

logback-config's People

Contributors

hholierhoek avatar leifw avatar mjpvandenberg avatar radist-nt avatar satabin avatar scanimation avatar urieli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

logback-config's Issues

NPE for included config with combined origins

  1. Append file includedConfig.conf with the following content to the src/test/resources:
include "./asyncAppender.conf"
test.logback {
}
  1. Modify file name in the first line of org.gnieh.logback.config.ConfigConfiguratorTest.testConfigureAsyncAppender() to includedConfig.conf
  2. Run tests.

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.

fallback to the BasicConfigurator if no configuration provided

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).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.