[logback-user] Log Message regardless of Log Level

Chris Pratt thechrispratt at gmail.com
Fri Dec 14 23:49:43 CET 2012


Typically they are logged at the INFO level (Since they are informational).
 Which give the user the choice of logging them or not.  Choice is usually
seen by users as a good thing.
  (*Chris*)


On Fri, Dec 14, 2012 at 2:42 PM, Shane Kelly <logback at ballinascreen.com>wrote:

> Folks,
>
> Just wondering if there is a capability within Logback for writing a log
> message regardless of whatever log level has been set in configuration.
> Consider the scenario where I want my web application to output some
> diagnostic information at startup or shutdown - for example, the Web
> Application version, build date etc. If I were to set the log level of
> these messages to be TRACE, DEBUG, or INFO then its possible they may never
> be displayed since the app may typically be configured to run with a log
> level of WARN. Similarly, I don't want to set the log level of the messages
> to WARN, ERROR or FATAL in order to ensure that they do get displayed since
> they're not really error messages, and if we monitor the log files for
> WARN, ERROR or FATAL messages then this would trigger a false positive.
>
> So, is there some way to force a message to be logged at all times,
> independently of log level? Or some way to achieve this effect via existing
> configuration. Arguably I suppose this is bending the rules slightly, in
> that it could be abused - why offer the ability to filter certain log
> levels if an application can override/ignore them - but perhaps this is
> something which could be configurable/switchable?
>
> Regards,
>
> Shane
>
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/logback-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20121214/15eaa1ed/attachment.html>


More information about the Logback-user mailing list