- Initial commit of HoardingAppender
HoardingAppender contains other appenders which it can build
dynamically depending on MDC values. The built appender is specified
as part of a configuration file. Here is an example.
<configuration debug="true">
<appender name="HOARD" class="ch.qos.logback.classic.hoard.HoardingAppender">
<mdcKey>userid</mdcKey>
<hoard>
<!-- you can put any appender here -->
<appender name="file-${userid}" class="ch.qos.logback.core.FileAppender">
<File>${userid}.log</File>
<Append>true</Append>
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>%d [%thread] %level %logger{35} - %msg%n</Pattern>
</layout>
</appender>
</hoard>
</appender>
<root level="DEBUG">
<appender-ref ref="HOARD" />
</root>
</configuration>
A new file appender will be built each according to the MDC value
associated with the key "userid" when a logging event occurs. The
above configuration file will ventilate logging into log files named
after the userid.
- Added PropertyContainer interface
- Context interface now extends PropertyContainer
- InterpretationContext implements PropertyContainer
It now has a field called propertiesMap which has precedence
over values placed in the context
- InterpretationContext.getSubstitutionProperty was renamed as
getProperty
- It is now possible to initialize a joran Interpreter with an initial
(not empty) pattern
This is still very much ongoing work.
parent
5e9af127
Please register or sign in to comment