Skip to content

asgeirn/wtf-logging

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

More Interesting Logging Levels

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

About

New logging categories for LogBack

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages