Class EmittingLogger
- java.lang.Object
-
- org.apache.druid.java.util.common.logger.Logger
-
- org.apache.druid.java.util.emitter.EmittingLogger
-
public class EmittingLogger extends Logger
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
EmittingLogger.EmittingAlertBuilder
-
Nested classes/interfaces inherited from class org.apache.druid.java.util.common.logger.Logger
Logger.LogFunction
-
-
Constructor Summary
Constructors Constructor Description EmittingLogger(Class clazz)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AlertBuilder
makeAlert(String message, Object... objects)
AlertBuilder
makeAlert(Throwable t, String message, Object... objects)
EmittingLogger
noStackTrace()
Returns a copy of this Logger that does not log exception stack traces, unless the log level is DEBUG or lower.static void
registerEmitter(ServiceEmitter emitter)
-
Methods inherited from class org.apache.druid.java.util.common.logger.Logger
assertionError, debug, debug, debug, debugSegments, error, error, error, error, errorSegments, getName, getSlf4jLogger, info, info, info, infoSegmentIds, infoSegments, isDebugEnabled, isInfoEnabled, isTraceEnabled, toString, trace, trace, warn, warn, warn, warn, warnSegments
-
-
-
-
Constructor Detail
-
EmittingLogger
public EmittingLogger(Class clazz)
-
-
Method Detail
-
registerEmitter
public static void registerEmitter(ServiceEmitter emitter)
-
noStackTrace
public EmittingLogger noStackTrace()
Description copied from class:Logger
Returns a copy of this Logger that does not log exception stack traces, unless the log level is DEBUG or lower. Useful for writing code like:log.noStackTrace().warn(e, "Something happened.");
- Overrides:
noStackTrace
in classLogger
-
makeAlert
public AlertBuilder makeAlert(String message, Object... objects)
-
makeAlert
public AlertBuilder makeAlert(@Nullable Throwable t, String message, Object... objects)
-
-