[logback-user] Variable substitution for logger name

Sanjeev Saha ssaha at ghx.com
Wed Nov 18 18:48:56 CET 2009


Consider the following variable declaration in an external file:

RootApplicationPackageName=some.foo.package

And the subsequent logger definition:

<logger name="${RootApplicationPackageName}" additivity="false">
   <appender-ref ref="APPLICATION_LOG" />
   <appender-ref ref="APPLICATION_ERROR_LOG" />
</logger>

On initialization, I see this:

10:22:58,318 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction
- Setting additivity of logger [${RootApplicationPackageName}] to false
10:22:58,318 |-INFO in
ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender
named [APPLICATION_LOG] to Logger[${RootApplicationPackageName}]
10:22:58,318 |-INFO in
ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender
named [APPLICATION_ERROR_LOG] to Logger[${RootApplicationPackageName}]

Is variable substitution not supported for Logger name?

I am using logback-core-0.9.17, logback-classic-0.9.17, slf4j-api-1.5.8
and janino-2.5.10.

-Sanjeev


CONFIDENTIALITY NOTICE -
This e-mail transmission, and any documents, files or previous e-mail messages attached to it, may contain information that is confidential. If you are not the intended recipient, or a person responsible for delivering it to the intended recipient, you are hereby notified that you must not read this transmission and that any disclosure, copying, printing, distribution or use of any of the information contained in or attached to this transmission is STRICTLY PROHIBITED. If you have received this transmission in error, please immediately notify the sender by telephone or return e-mail and delete the original transmission and its attachments without reading or saving in any manner.


More information about the Logback-user mailing list