java - Config SLF4J in jar file -


i have own jar file used library main application. need set slf4j logger , configure in jar.

  • write logs file
  • set other configurations in property file

when googled, there samples web apps. 1 let me know how above functionalities or mention useful resource.

for library, should include slf4j-api.jar. means in code, should use classes within slf4j's api, i.e. loggerfactory , logger.

your library should not define else regarding logging. it's responsibility of application uses library define underlying logging implementation (logback, log4j, jcl, etc) , include necessary bindings, underlying logging platform's configuration, such logback.xml file.

please refer slf4j manual further reference.


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -