public class DefaultServiceLog extends FqcnIgnoringPaxLogger
This Logger will be used when the Pax Logging Service is not (yet) available.
Default threshold is DEBUG but can be changed if the PaxLoggingConstants.LOGGING_CFG_DEFAULT_LOG_LEVEL
system or context property is set to on of the following: TRACE, DEBUG, INFO, WARN, ERROR, FATAL, or NONE,
by calling the static method setLogLevel(String), where threshold is one of the same strings.
| Modifier and Type | Field and Description |
|---|---|
static int |
DEBUG |
static int |
ERROR |
static int |
FATAL |
static int |
INFO |
static String[] |
levels |
static int |
NONE |
static int |
TRACE |
static int |
WARN |
LEVEL_DEBUG, LEVEL_ERROR, LEVEL_INFO, LEVEL_TRACE, LEVEL_WARNING| Modifier and Type | Method and Description |
|---|---|
void |
debug(PaxMarker marker,
String message,
Throwable t) |
void |
debug(String message,
Throwable t) |
void |
error(PaxMarker marker,
String message,
Throwable t) |
void |
error(String message,
Throwable t) |
void |
fatal(PaxMarker marker,
String message,
Throwable t) |
void |
fatal(String message,
Throwable t) |
int |
getLogLevel()
Returns numerical log level associated with this logger.
|
String |
getName()
Returns the name of the logger - usually in dot-separated format.
|
PaxContext |
getPaxContext()
PaxContext of this logger that gives access to thread-bound MDC context. |
static int |
getStaticLogLevel() |
void |
inform(PaxMarker marker,
String message,
Throwable t) |
void |
inform(String message,
Throwable t) |
boolean |
isDebugEnabled() |
boolean |
isDebugEnabled(PaxMarker marker) |
boolean |
isErrorEnabled() |
boolean |
isErrorEnabled(PaxMarker marker) |
boolean |
isFatalEnabled() |
boolean |
isFatalEnabled(PaxMarker marker) |
boolean |
isInfoEnabled() |
boolean |
isInfoEnabled(PaxMarker marker) |
boolean |
isTraceEnabled() |
boolean |
isTraceEnabled(PaxMarker marker) |
boolean |
isWarnEnabled() |
boolean |
isWarnEnabled(PaxMarker marker) |
protected void |
output(PrintStream out,
String levelName,
String message,
Throwable t) |
protected void |
output(String levelName,
String message,
Throwable t)
Outputs logging event with preconfigured layout.
|
static void |
setLogLevel(String level)
Sets the threshold for this default/fallback logger.
|
void |
trace(PaxMarker marker,
String message,
Throwable t) |
void |
trace(String message,
Throwable t) |
void |
warn(PaxMarker marker,
String message,
Throwable t) |
void |
warn(String message,
Throwable t) |
public static final String[] levels
public static final int TRACE
public static final int DEBUG
public static final int INFO
public static final int WARN
public static final int ERROR
public static final int FATAL
public static final int NONE
public boolean isTraceEnabled()
public boolean isDebugEnabled()
public boolean isInfoEnabled()
public boolean isWarnEnabled()
public boolean isErrorEnabled()
public boolean isFatalEnabled()
public boolean isTraceEnabled(PaxMarker marker)
public boolean isDebugEnabled(PaxMarker marker)
public boolean isInfoEnabled(PaxMarker marker)
public boolean isWarnEnabled(PaxMarker marker)
public boolean isErrorEnabled(PaxMarker marker)
public boolean isFatalEnabled(PaxMarker marker)
public int getLogLevel()
PaxLoggerReturns numerical log level associated with this logger. Higher values mean more important
levels (as in PaxLevel). Only these constants should be returned
(in increasing importance/severity):
public static int getStaticLogLevel()
public static void setLogLevel(String level)
Sets the threshold for this default/fallback logger. Events with level lower than given threshold won't be logged.
Karaf sets this threshold to ERROR (in etc/system.properties).
level - public String getName()
PaxLoggerprotected void output(String levelName, String message, Throwable t)
levelName - message - t - protected final void output(PrintStream out, String levelName, String message, Throwable t)
public PaxContext getPaxContext()
PaxLoggerPaxContext of this logger that gives access to thread-bound MDC context.Copyright © 2006–2022 OPS4J - Open Participation Software for Java. All rights reserved.