[logback-user] auto context name creation

Anders Hammar anders at hammar.net
Thu Jan 24 08:27:09 CET 2008


Hi,

As I see it there are probably numerous ways this can be done and it has
nothing to do with logback. If you're using ant, the easiest way would
probably be to use a token in the web.xml file that is replaced during the
build process. The token would then be replaced (through the ant filter
task) with, for instance, myApp22012008 or myApp23012008 depending on the
build.

More info:
http://ant.apache.org/manual/CoreTasks/filter.html

Hope it helps,
/Anders


Ingo Siebert wrote:
> 
> Hi,
> 
> i switched to logback because it sounds promising.
> 
> I have an web appplication (Tomcat6) which can be deployed more than once.
> In the FAQ i've read this to get a context-based logging.
> 
> <env-entry>
>    <description>JNDI logging context for this app</description>
>    <env-entry-name>logback/context-name</env-entry-name>
>    <env-entry-type>java.lang.String</env-entry-type>
>    <env-entry-value>ContextApp-A</env-entry-value>
> </env-entry>
> 
> 
> Is it possible to auto-create a different "ContextApp-A" value?
> 
> Reason: I want to deploy nearly the same WAR under different names at 
> the same time. Example: myApp22012008.war and myApp23012008.war
> 
> Cheers,
> 
> Ingo
> 
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://qos.ch/mailman/listinfo/logback-user
> 
> 

-- 
View this message in context: http://www.nabble.com/auto-context-name-creation-tp15024810p15059930.html
Sent from the Logback User mailing list archive at Nabble.com.




More information about the Logback-user mailing list