Binny Mathew | I am working with logback.xml and below is the snippet that i am using so as every call will have a log based on the icm-call-id. Initially when the Application loads the icm-call-id will not be there so the an "unknown.log" gets created (defaultValue).
<!--Working fine --> <appender name="SIFT" class="ch.qos.logback.classic.sift.SiftingAppender"> <discriminator> <key>icm_call_id</key> <defaultValue>unkown</defaultValue> </discriminator> <sift> <appender name="FILE-${icm_call_id}" class="ch.qos.logback.core.FileAppender"> <file>c:/tmp/DWHConfig/logs/hu/${icm_call_id}.log</file> <append>false</append> <layout class="ch.qos.logback.classic.PatternLayout"> <pattern>%d [%thread] %level %mdc %logger{35} - %msg%n</pattern> </layout> </appender> </sift> </appender>
The issue is whenever i try to implement the filter parameter the log (nor the icm-call-id or the unknown.log) gets written
<filter class="ch.qos.logback.core.filter.EvaluatorFilter"> <!-- GEventEvaluator requires Groovy --> <evaluator class="ch.qos.logback.classic.boolex.GEventEvaluator"> <expression> (mdc.get("icm_call_id") == null) </expression> </evaluator> <OnMismatch>NEUTRAL</OnMismatch> <OnMatch>DENY</OnMatch> </filter>
What am i missing here?? When i try to implement the timeBasedPolicy only on the unknown.log that too does not work. Binny |
| Please sign in to flag this as inappropriate. |