|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.util.log.NShotLogger com.atlassian.jira.util.log.OneShotLogger
public class OneShotLogger
An Log4J logger wrapper than will only log 1 times After maxTimes number of calls the logger silently discards thee logging output.
The logging is done via a delegate Logger You might use it a bit like thisprivate static final Logger log = Logger.getLogger(MyObject.class); private static final Logger oneShotParseErrorLog = new OneShotLogger(log); ... ... if (parseErrorOnSomethingThatWeOnlywanToReportOnce == true) { oneShotParseErrorLog.log("Things seem quite screwy in your config"); }
Constructor Summary | |
---|---|
OneShotLogger(org.apache.log4j.Logger delegateLogger)
|
Method Summary |
---|
Methods inherited from class com.atlassian.jira.util.log.NShotLogger |
---|
debug, debug, error, error, fatal, fatal, getDelegateLogger, info, info, isDebugEnabled, isEnabledFor, isInfoEnabled, warn, warn |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OneShotLogger(org.apache.log4j.Logger delegateLogger)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |