[logback-dev] Question about LoggerContext.putProperty and putObject

Ceki Gulcu ceki at qos.ch
Tue Mar 10 12:32:21 CET 2009


It is possible to set properties from a config file. This is
documented at:

http://logback.qos.ch/manual/configuration.html#variableSubstitution
http://logback.qos.ch/manual/configuration.html#insertFromJNDI

LoggerContext properties also survive serialization. However, in
future releases I'd like to distinguish between "local" variables
which do not survive serialization and "persistent" variables which do
survive.

You might also be interested to know that you can define your own
parsing rules on the fly:
http://logback.qos.ch/manual/configuration.html#insertFromJNDI

HTH,


Joern Huxhorn wrote:
> Hi,
> 
> I'd like to know if it's possible to set properties and/or objects of 
> the LoggerContext using a standard joran config file.
> 
> At the moment, my own appender has a setApplicationIdentifier so I'm 
> able to easily identify different apps running on the same host.
> Would it be possible to use the mentioned LoggerContext methods for this?
> 
> Joern.

-- 
Ceki Gülcü
Logback: The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch


More information about the logback-dev mailing list