[logback-user] Evaluable properties

Ceki Gülcü ceki at qos.ch
Mon Feb 1 17:17:57 CET 2010


Hello Aleksey,

What you describe would be a pretty useful feature to have. Can you please enter 
an enhancement request on our jira?

Best regards,

On 01/02/2010 11:12 AM, Aleksey Didik wrote:
> 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
> property.
> 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>
> </property>
>
> 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
>
>


More information about the Logback-user mailing list