[logback-user] Externalized Logback configuration for web applications

Thorbjørn Ravn Andersen thunderaxiom at hotmail.com
Fri Feb 1 11:53:57 CET 2013


Just for the record, the servlet specification (or is it the Java EE) does
not allow you to write to the file system, making your application subtly
vendor dependent.

We therefore use the jdk14 bridge instead of logback to use the container
logging instead.

/Thorbjørn


-----Original Message-----
From: logback-user-bounces at qos.ch [mailto:logback-user-bounces at qos.ch] On
Behalf Of Richard Sand
Sent: 31. januar 2013 20:40
To: logback-user at qos.ch
Subject: Re: [logback-user] Externalized Logback configuration for web
applications

Is it possible to grab the value of the filename from the context of the web
application itself, e.g. a <context-param> inside the web.xml? Idea here is
that this can be overridden by a context.xml at deployment time, to
externalize the filename without disturbing the web application archive, and
without needing JNDI.

e.g. so:

<include file="/opt/logback-A.xml"> 

becomes:

<include file="${some-value-from-deployment-descriptor}"> 

Thanks!

Best regards,

Richard



--
View this message in context:
http://logback.10977.n7.nabble.com/Externalized-Logback-configuration-for-we
b-applications-tp3629p11387.html
Sent from the Users mailing list archive at Nabble.com.
_______________________________________________
Logback-user mailing list
Logback-user at qos.ch
http://mailman.qos.ch/mailman/listinfo/logback-user



More information about the Logback-user mailing list