John Barnette proposed some revised log levels:
Revised log levels proposal: “fyi,” “wtf,” and “omg.”
— John Barnette (@jbarnette) December 8, 2011
I have implemented this for Logback. To use it, simply add the following to your logback.xml:
<conversionRule conversionWord="wtf"
converterClass="no.twingine.logging.WtfLevelConverter" />
You can then use %wtf
in your <pattern>
instead of %level
to produce this type of result:
logger.error("Oh My GOD!");
logger.warn("What The F*ck just happened?");
logger.info("JFYI it worked fine.");
logger.debug("Oh by the way -- test this");
10:05:35.993 [main] OMG no.twingine.logging.WtfLoggerTest - Oh My GOD! 10:05:35.994 [main] WTF no.twingine.logging.WtfLoggerTest - What The F*ck just happened? 10:05:35.994 [main] FYI no.twingine.logging.WtfLoggerTest - JFYI it worked fine. 10:05:35.994 [main] BTW no.twingine.logging.WtfLoggerTest - Oh by the way -- test this