[logback-user] Configuring properties via XML

ceki ceki at qos.ch
Thu Nov 8 19:01:15 CET 2012


Please see [1] in the docs. For your use case, you need to define the 
property in the context scope [2].

[1] http://logback.qos.ch/manual/configuration.html#variableSubstitution
[2] http://logback.qos.ch/manual/configuration.html#scopes

On 08.11.2012 18:54, Adam Gordon wrote:
> The Layout chapter indicates it supports property value retrieval via
> %property{key} and states that the logging context is where one might
> put a property (along w/ System properties).  I believe log4j did this
> w/ the <param name="key_name" value="some_value"> element in the
> <appender> and referenced it via %properties{key_name}.
>
> I'm not seeing how to do this in Logback in XML. Would it go in the
> <logger> element?  What's the syntax?  Could someone please point me to
> the relevant section in the appropriate chapter of the manual?
>
> Thanks,
>
> --adam
>
> http://gordonizer.com
>
>


-- 
Ceki
http://twitter.com/#!/ceki


More information about the Logback-user mailing list