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

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -