[logback-user] Evaluable properties

Aleksey Didik didik at magenta-technology.ru
Mon Feb 1 11:12:30 CET 2010

Hello all,

I need to name my log file as /${host-name}.log/ and the question is, 
how can I do it?
In logback.xml I can use properties definition, but it's static, not 
dynamical evaluabled.
System properties can't help me to, I can't define host on every 
application start.
I can use LoggerContext, but I don't want to have 'compile' dependencies 
on logback classes.

In version 0.9.17 was made possibility to save formatted timestamp in 
May be possible to create property evaluator tag, to dynamical define 
some properties value?
Something like this:

<property name="host name" evaluator="org.xxx.PropertyEvaluator">
<parameter name="host type">value</parameter>

Evaluator will be called on property initialization with listed parameters.
I can make necessary patch for logback.

May be I have said well-known truths :) Sorry and correct me.

Best regards,
Aleksey Didik

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://qos.ch/pipermail/logback-user/attachments/20100201/5d70a32e/attachment.html>

More information about the Logback-user mailing list