public class CamelLogger extends Object
Logger
.
The name CamelLogger has been chosen to avoid any name clash with log kits which has a Logger
class.Constructor and Description |
---|
CamelLogger() |
CamelLogger(org.slf4j.Logger log) |
CamelLogger(org.slf4j.Logger log,
LoggingLevel level) |
CamelLogger(org.slf4j.Logger log,
LoggingLevel level,
String marker) |
CamelLogger(String logName) |
CamelLogger(String logName,
LoggingLevel level) |
CamelLogger(String logName,
LoggingLevel level,
String marker) |
Modifier and Type | Method and Description |
---|---|
void |
doLog(String message)
Logs the message without checking the
shouldLog() method first. |
LoggingLevel |
getLevel() |
org.slf4j.Logger |
getLog() |
org.slf4j.Marker |
getMarker() |
static void |
log(org.slf4j.Logger log,
LoggingLevel level,
org.slf4j.Marker marker,
String message) |
static void |
log(org.slf4j.Logger log,
LoggingLevel level,
org.slf4j.Marker marker,
String message,
Throwable th) |
static void |
log(org.slf4j.Logger log,
LoggingLevel level,
String message) |
static void |
log(org.slf4j.Logger log,
LoggingLevel level,
String message,
Throwable th) |
void |
log(String message)
Logs the message with checking the
shouldLog() method first. |
void |
log(String message,
LoggingLevel loggingLevel) |
void |
log(String message,
Throwable exception) |
void |
log(String message,
Throwable exception,
LoggingLevel loggingLevel) |
void |
setLevel(LoggingLevel level) |
void |
setLog(org.slf4j.Logger log) |
void |
setLogName(String logName) |
void |
setMarker(org.slf4j.Marker marker) |
void |
setMarker(String marker) |
boolean |
shouldLog() |
static boolean |
shouldLog(org.slf4j.Logger log,
LoggingLevel level) |
String |
toString() |
public CamelLogger()
public CamelLogger(org.slf4j.Logger log)
public CamelLogger(org.slf4j.Logger log, LoggingLevel level)
public CamelLogger(org.slf4j.Logger log, LoggingLevel level, String marker)
public CamelLogger(String logName)
public CamelLogger(String logName, LoggingLevel level)
public CamelLogger(String logName, LoggingLevel level, String marker)
public void log(String message, LoggingLevel loggingLevel)
public void log(String message)
shouldLog()
method first.message
- the message to log, if shouldLog()
returned truepublic void doLog(String message)
shouldLog()
method first.message
- the message to logpublic void log(String message, Throwable exception, LoggingLevel loggingLevel)
public org.slf4j.Logger getLog()
public void setLog(org.slf4j.Logger log)
public LoggingLevel getLevel()
public void setLevel(LoggingLevel level)
public void setLogName(String logName)
public org.slf4j.Marker getMarker()
public void setMarker(org.slf4j.Marker marker)
public void setMarker(String marker)
public static void log(org.slf4j.Logger log, LoggingLevel level, String message)
public static void log(org.slf4j.Logger log, LoggingLevel level, org.slf4j.Marker marker, String message)
public static void log(org.slf4j.Logger log, LoggingLevel level, String message, Throwable th)
public static void log(org.slf4j.Logger log, LoggingLevel level, org.slf4j.Marker marker, String message, Throwable th)
public boolean shouldLog()
public static boolean shouldLog(org.slf4j.Logger log, LoggingLevel level)
Apache Camel