<div dir="ltr">Ceki, Ralph,<div><br></div><div>I did try the TurboFilter as suggested, however, something which I probably didn't make explicitly clear in my original post was that I configure a ThresholdFilter within each of my appenders to filter out messages below a certain level - as I said previously, its likely that the application I'm working on will be configured only to log messages of WARN and above. For example:<br>
<br> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"></div><div><br></div><div><div> <turboFilter class="ch.qos.logback.classic.turbo.MarkerFilter"></div>
<div>
<Name>ALWAYSLOG</Name></div><div> <Marker>ALWAYSLOG</Marker></div><div> <OnMatch>ACCEPT</OnMatch></div><div> </turboFilter></div><div><br></div><div> <filter class="ch.qos.logback.classic.filter.ThresholdFilter"></div>
<div> <level>WARN</level></div><div> </filter></div><div><br></div> ...</div><div> ...</div><div><br></div><div> </appender></div><div><br>Although the Marker turbofilter is ACCEPTing messages which contain the appropriate 'marker' as expected, the message will then get filtered out by the subsequent the Threshold filter - I suppose I could extend the standard Threshold filter to look for the presence of the marker and bypass normal threshold filtering in these cases... or did I misunderstand something?</div>
<div><br></div><div style>Regards,</div><div style><br></div><div style>Shane</div><div class="gmail_extra"><br><div class="gmail_quote">On 18 December 2012 14:46, ceki <span dir="ltr"><<a href="mailto:ceki@qos.ch" target="_blank">ceki@qos.ch</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Shane,<br>
<br>
Were you able to make progress on this issue?<div class="im"><br>
<br>
On 15.12.2012 01:56, Shane Kelly wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
Ralph,<br>
<br>
Thanks for your suggestion - after a quick skim through the<br>
documentation it certainly looks like markers may provide the behaviour<br>
I'm looking for - will give that a try.<br>
<br>
Regards,<br>
<br>
Shane<br>
<br>
<br>
On 15 December 2012 00:21, Ralph Goers <<a href="mailto:rgoers@apache.org" target="_blank">rgoers@apache.org</a><br></div><div><div class="h5">
<mailto:<a href="mailto:rgoers@apache.org" target="_blank">rgoers@apache.org</a>>> wrote:<br>
<br>
Use a Marker. Then set a Marker filter to always accept events with<br>
that Marker.<br>
<br>
Ralph<br>
<br>
<br>
On Dec 14, 2012, at 2:42 PM, Shane Kelly wrote:<br>
<br>
> Folks,<br>
><br>
> Just wondering if there is a capability within Logback for<br>
writing a log message regardless of whatever log level has been set<br>
in configuration. Consider the scenario where I want my web<br>
application to output some diagnostic information at startup or<br>
shutdown - for example, the Web Application version, build date etc.<br>
If I were to set the log level of these messages to be TRACE, DEBUG,<br>
or INFO then its possible they may never be displayed since the app<br>
may typically be configured to run with a log level of WARN.<br>
Similarly, I don't want to set the log level of the messages to<br>
WARN, ERROR or FATAL in order to ensure that they do get displayed<br>
since they're not really error messages, and if we monitor the log<br>
files for WARN, ERROR or FATAL messages then this would trigger a<br>
false positive.<br>
><br>
> So, is there some way to force a message to be logged at all<br>
times, independently of log level? Or some way to achieve this<br>
effect via existing configuration. Arguably I suppose this is<br>
bending the rules slightly, in that it could be abused - why offer<br>
the ability to filter certain log levels if an application can<br>
override/ignore them - but perhaps this is something which could be<br>
configurable/switchable?<br>
><br>
> Regards,<br>
><br>
> Shane<br>
<br>
</div></div></blockquote><span class="HOEnZb"><font color="#888888">
<br>
<br>
-- <br>
Ceki<br>
<a href="http://twitter.com/#!/ceki" target="_blank">http://twitter.com/#!/ceki</a></font></span><div class="HOEnZb"><div class="h5"><br>
______________________________<u></u>_________________<br>
Logback-user mailing list<br>
<a href="mailto:Logback-user@qos.ch" target="_blank">Logback-user@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/listinfo/logback-user" target="_blank">http://mailman.qos.ch/mailman/<u></u>listinfo/logback-user</a><br>
</div></div></blockquote></div><br></div></div>