[logback-user] Logback with WebLogic Server - Suggestions

Ceki Gülcü ceki at qos.ch
Wed Feb 2 23:15:06 CET 2011

On 02/02/2011 10:57 PM, jaybytez wrote:
> I am totally new to SLF4J/Logback, and I am using WebLogic Server 11.
> We previously were using log4j and used an external file and some custom
> class so that we could update the log4j file at runtime and not have to
> reboot the server or application.  We didn't use the WebLogic Server console
> to change the logging level.

This use case is supported as of 0.9.28. Package logback.xml in your 
application and include a file external to your app. Here is an example 
of logback.xml.

<configuration scan="true">
   <include file="some/path/logback-myapp.xml"/>

Since automatic file scanning is transient wrt included files, whenever 
you change the external file, the changes will be picked up within 30 
seconds or so.

See [1, 2] for precise docs.

[1] http://logback.qos.ch/manual/configuration.html#fileInclusion
[2] http://logback.qos.ch/manual/configuration.html#autoScan

> So if I want to use slf4j/logback, is there anything special I have to do
> for placing jars in the bootclasspath or lib directory.  As well as when I
> want to have runtime changes to the log level, what is the best way to do
> this with slf4j/logback and WebLogic Server?

If you don't care about the server's logs, just bundle logback-core.jar, 
logback-classic.jar and slf4j-api.jar in your application. That's the 
simplest approach. You can still use jcl-over-slf4j.jar instead of 

If you also want to direct Weblogic's logs, then things get more 
complicated. I would avoid going that route.

More information about the Logback-user mailing list