<div dir="ltr"><div>This must be a simple thing, but I am not getting it.</div><div><br></div><div>I have a marker, say "performance" that I use when logging. Also, I often use isDebugEnabled() etc. when log messages become expensive to build.</div><div><br></div><div>Now I want to configure logback that I can do these two things:</div><div><br></div><div>1) Log all statements in Logger foo.Bar that are debug or higher and use the marker "performance"</div><div><br></div><div>2) Log all statements across all Loggers that use the marker "performance"</div><div><br></div><div>To achieve 1) I tried this:</div><div><br></div><div><turboFilter class="ch.qos.logback.classic.turbo.MarkerFilter"></div><div> <Marker>index-control-flow</Marker></div><div> <OnMatch>ACCEPT</OnMatch></div><div></turboFilter></div><div><br></div><div><logger name="foo.Bar" level="DEBUG"/></div><div>Then also all log messages that are not tagged with this marker appear in the log.</div><div><br></div><div>To achieve 2) I tried omitting the logger line above and got only log messages with the marker, however, all log messages protected by a check of isDebugEnabled() are omitted.</div><div><br></div><div>I must be missing a general concept here.</div><div><br></div><div>Thanks in advance,</div><div><br></div><div>Robert</div>
</div>