Package io.toro.martini.util
Class PrefixingLogger
- java.lang.Object
-
- io.toro.martini.util.PrefixingLogger
-
- All Implemented Interfaces:
Logger
public final class PrefixingLogger extends Object implements Logger
Logger that adds prefix to its log messages. This makes tracking of some log messages easier to track.
Usage:
PrefixingLogger logger = new PrefixingLogger( "Bambi", Bambi.class );
logger.info ( "was here" );
Expected Log Message:
{Bambi} -> was here
-
-
Field Summary
-
Fields inherited from interface org.slf4j.Logger
ROOT_LOGGER_NAME
-
-
Constructor Summary
Constructors Constructor Description PrefixingLogger(String prefix, Class clazz)
PrefixingLogger(String prefix, Logger logger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
debug(String msg)
void
debug(String format, Object arg)
void
debug(String format, Object... arguments)
void
debug(String format, Object arg1, Object arg2)
void
debug(String msg, Throwable t)
void
debug(Marker marker, String msg)
void
debug(Marker marker, String format, Object arg)
void
debug(Marker marker, String format, Object... arguments)
void
debug(Marker marker, String format, Object arg1, Object arg2)
void
debug(Marker marker, String msg, Throwable t)
void
error(String msg)
void
error(String format, Object arg)
void
error(String format, Object... arguments)
void
error(String format, Object arg1, Object arg2)
void
error(String msg, Throwable t)
void
error(Marker marker, String msg)
void
error(Marker marker, String format, Object arg)
void
error(Marker marker, String format, Object... arguments)
void
error(Marker marker, String format, Object arg1, Object arg2)
void
error(Marker marker, String msg, Throwable t)
String
getName()
void
info(String msg)
void
info(String format, Object arg)
void
info(String format, Object... arguments)
void
info(String format, Object arg1, Object arg2)
void
info(String msg, Throwable t)
void
info(Marker marker, String msg)
void
info(Marker marker, String format, Object arg)
void
info(Marker marker, String format, Object... arguments)
void
info(Marker marker, String format, Object arg1, Object arg2)
void
info(Marker marker, String msg, Throwable t)
boolean
isDebugEnabled()
boolean
isDebugEnabled(Marker marker)
boolean
isErrorEnabled()
boolean
isErrorEnabled(Marker marker)
boolean
isInfoEnabled()
boolean
isInfoEnabled(Marker marker)
boolean
isTraceEnabled()
boolean
isTraceEnabled(Marker marker)
boolean
isWarnEnabled()
boolean
isWarnEnabled(Marker marker)
void
trace(String msg)
void
trace(String format, Object arg)
void
trace(String format, Object... arguments)
void
trace(String format, Object arg1, Object arg2)
void
trace(String msg, Throwable t)
void
trace(Marker marker, String msg)
void
trace(Marker marker, String format, Object arg)
void
trace(Marker marker, String format, Object... argArray)
void
trace(Marker marker, String format, Object arg1, Object arg2)
void
trace(Marker marker, String msg, Throwable t)
void
warn(String msg)
void
warn(String format, Object arg)
void
warn(String format, Object... arguments)
void
warn(String format, Object arg1, Object arg2)
void
warn(String msg, Throwable t)
void
warn(Marker marker, String msg)
void
warn(Marker marker, String format, Object arg)
void
warn(Marker marker, String format, Object... arguments)
void
warn(Marker marker, String format, Object arg1, Object arg2)
void
warn(Marker marker, String msg, Throwable t)
-
-
-
Method Detail
-
isTraceEnabled
public boolean isTraceEnabled()
- Specified by:
isTraceEnabled
in interfaceLogger
-
isTraceEnabled
public boolean isTraceEnabled(Marker marker)
- Specified by:
isTraceEnabled
in interfaceLogger
-
isDebugEnabled
public boolean isDebugEnabled()
- Specified by:
isDebugEnabled
in interfaceLogger
-
isDebugEnabled
public boolean isDebugEnabled(Marker marker)
- Specified by:
isDebugEnabled
in interfaceLogger
-
isInfoEnabled
public boolean isInfoEnabled()
- Specified by:
isInfoEnabled
in interfaceLogger
-
isInfoEnabled
public boolean isInfoEnabled(Marker marker)
- Specified by:
isInfoEnabled
in interfaceLogger
-
isWarnEnabled
public boolean isWarnEnabled()
- Specified by:
isWarnEnabled
in interfaceLogger
-
isWarnEnabled
public boolean isWarnEnabled(Marker marker)
- Specified by:
isWarnEnabled
in interfaceLogger
-
isErrorEnabled
public boolean isErrorEnabled()
- Specified by:
isErrorEnabled
in interfaceLogger
-
isErrorEnabled
public boolean isErrorEnabled(Marker marker)
- Specified by:
isErrorEnabled
in interfaceLogger
-
-