简体   繁体   中英

LogBack as SharedLibrary in IBM WebSphere 8.5

I want to use LogBack with IBM WebSphere 8.5 as a Shared Library. My problem is I don't know where to put the logback.xml so I can redirects some of my logs to different files. Currently all my logs are directed to System.out.log in WAS, which I don't want.

I've tried to put the logback.xml in my Dynamic Application Project WEB-INF/classes folder, in my EJB Project ejbModule folder, with no success.

I've tried googling all over, but I cannot find anything pointing to this issue.

Any idea?

Regards,

I've successfully used SLF4J API with Logback implementation with WAS 7. My configuration was:

  • logback-classic-x.jar, logback-core-x.jar (, slf4j-api-x.jar) in my EAR's lib directory
  • logback.xml in my EJB's root source folder (ejbModule)

And that was it.

Placing logback.xml in a JAR and placing that JAR into your EAR's lib should also work.

Don't you get any logback related errors during application startup?

From Logback FAQ :

put logback.xml in

  • any folder declared in classpath
  • WEB-INF/classes directly

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM