Details
-
Improvement
-
Resolution: Fixed
-
Major
-
None
-
None
-
None
-
All
Description
This is referenced also here: http://old.nabble.com/Appender-Ref-Default-Value-to28605941.html
Please can we have the ability to specify default values for appender-refs. I have a use case where we need to "bake-in" the appender during build-time. I can do this at the moment for logger level by bringing in a property file (called override.properties) that can reset the logging level (which is dependent on the deployment environment and other factors).
Here is a little example:
<property resource="override.properties" />
<logger name="bar.foo" level="${bar.foo.log.level:-info}" additivity="false">
<appender-ref ref="console"/>
</logger>
The bar.foo.log.level is defined in the override.properties file. The correct file gets inserted for each build type.
I would like to do the following as well:
<logger name="bar.foo" level="${bar.foo.log.level:-info}" additivity="false">
<appender-ref ref="${bar.foo.log.appender:-console}"/>
</logger>
So that I can tell the override where to log to (console for development or log file, or smtp, or jms, or db for other environments).
This would be so neato if implemented
Thank you.
=david=