HADOOP-18808. LogExactlyOnce to add a debug() method (#5850)
Contributed by Steve Loughran
This commit is contained in:
parent
38ac2f7349
commit
b3130056f5
@ -49,4 +49,15 @@ public void error(String format, Object...args) {
|
||||
log.error(format, args);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Log at DEBUG if nothing has been logged yet.
|
||||
* @param format format string
|
||||
* @param args arguments
|
||||
*/
|
||||
public void debug(String format, Object...args) {
|
||||
if (!logged.getAndSet(true)) {
|
||||
log.debug(format, args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user