public class SimpleLogger extends AbstractLogger
CATCHING_MARKER, DEFAULT_FLOW_MESSAGE_FACTORY_CLASS, DEFAULT_MESSAGE_FACTORY_CLASS, ENTRY_MARKER, EXCEPTION_MARKER, EXIT_MARKER, FLOW_MARKER, logBuilder, name, THROWING_MARKER
Constructor and Description |
---|
SimpleLogger(String name,
Level defaultLevel,
boolean showLogName,
boolean showShortLogName,
boolean showDateTime,
boolean showContextMap,
String dateTimeFormat,
MessageFactory messageFactory,
PropertiesUtil props,
PrintStream stream) |
Modifier and Type | Method and Description |
---|---|
Level |
getLevel()
Gets the Level associated with the Logger.
|
boolean |
isEnabled(Level testLevel,
Marker marker,
CharSequence msg,
Throwable t)
Determines if logging is enabled.
|
boolean |
isEnabled(Level testLevel,
Marker marker,
Message msg,
Throwable t)
Determines if logging is enabled.
|
boolean |
isEnabled(Level testLevel,
Marker marker,
Object msg,
Throwable t)
Determines if logging is enabled.
|
boolean |
isEnabled(Level testLevel,
Marker marker,
String msg)
Determine if logging is enabled.
|
boolean |
isEnabled(Level testLevel,
Marker marker,
String msg,
Object... p1)
Determines if logging is enabled.
|
boolean |
isEnabled(Level testLevel,
Marker marker,
String message,
Object p0)
Determines if logging is enabled.
|
boolean |
isEnabled(Level testLevel,
Marker marker,
String message,
Object p0,
Object p1)
Determines if logging is enabled.
|
boolean |
isEnabled(Level testLevel,
Marker marker,
String message,
Object p0,
Object p1,
Object p2)
Determines if logging is enabled.
|
boolean |
isEnabled(Level testLevel,
Marker marker,
String message,
Object p0,
Object p1,
Object p2,
Object p3)
Determines if logging is enabled.
|
boolean |
isEnabled(Level testLevel,
Marker marker,
String message,
Object p0,
Object p1,
Object p2,
Object p3,
Object p4)
Determines if logging is enabled.
|
boolean |
isEnabled(Level testLevel,
Marker marker,
String message,
Object p0,
Object p1,
Object p2,
Object p3,
Object p4,
Object p5)
Determines if logging is enabled.
|
boolean |
isEnabled(Level testLevel,
Marker marker,
String message,
Object p0,
Object p1,
Object p2,
Object p3,
Object p4,
Object p5,
Object p6)
Determines if logging is enabled.
|
boolean |
isEnabled(Level testLevel,
Marker marker,
String message,
Object p0,
Object p1,
Object p2,
Object p3,
Object p4,
Object p5,
Object p6,
Object p7)
Determines if logging is enabled.
|
boolean |
isEnabled(Level testLevel,
Marker marker,
String message,
Object p0,
Object p1,
Object p2,
Object p3,
Object p4,
Object p5,
Object p6,
Object p7,
Object p8)
Determines if logging is enabled.
|
boolean |
isEnabled(Level testLevel,
Marker marker,
String message,
Object p0,
Object p1,
Object p2,
Object p3,
Object p4,
Object p5,
Object p6,
Object p7,
Object p8,
Object p9)
Determines if logging is enabled.
|
boolean |
isEnabled(Level testLevel,
Marker marker,
String msg,
Throwable t)
Determines if logging is enabled.
|
void |
logMessage(String fqcn,
Level mgsLevel,
Marker marker,
Message msg,
Throwable throwable)
Always logs a message at the specified level.
|
void |
setLevel(Level level) |
void |
setStream(PrintStream stream) |
always, atDebug, atError, atFatal, atInfo, atLevel, atTrace, atWarn, catching, catching, catching, catchingMsg, checkMessageFactory, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, enter, enter, enter, enter, enter, entry, entry, entry, entryMsg, entryMsg, entryMsg, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, error, exit, exit, exit, exit, exitMsg, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, getMessageFactory, getName, getRecursionDepth, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, info, isDebugEnabled, isDebugEnabled, isEnabled, isEnabled, isErrorEnabled, isErrorEnabled, isFatalEnabled, isFatalEnabled, isInfoEnabled, isInfoEnabled, isTraceEnabled, isTraceEnabled, isWarnEnabled, isWarnEnabled, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, log, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logIfEnabled, logMessage, logMessage, logMessage, logMessage, logMessage, logMessage, logMessage, logMessage, logMessage, logMessage, logMessage, logMessage, logMessage, logMessage, logMessage, logMessage, logMessage, logMessage, logMessage, printf, printf, requiresLocation, throwing, throwing, throwing, throwingMsg, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, traceEntry, traceEntry, traceEntry, traceEntry, traceEntry, traceExit, traceExit, traceExit, traceExit, traceExit, traceExit, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn
public SimpleLogger(String name, Level defaultLevel, boolean showLogName, boolean showShortLogName, boolean showDateTime, boolean showContextMap, String dateTimeFormat, MessageFactory messageFactory, PropertiesUtil props, PrintStream stream)
public Level getLevel()
Logger
public boolean isEnabled(Level testLevel, Marker marker, Message msg, Throwable t)
ExtendedLogger
testLevel
- The logging Level to check.marker
- A Marker or null.msg
- The Message.t
- A Throwable.public boolean isEnabled(Level testLevel, Marker marker, CharSequence msg, Throwable t)
ExtendedLogger
testLevel
- The logging Level to check.marker
- A Marker or null.msg
- The message.t
- A Throwable.public boolean isEnabled(Level testLevel, Marker marker, Object msg, Throwable t)
ExtendedLogger
testLevel
- The logging Level to check.marker
- A Marker or null.msg
- The message.t
- A Throwable.public boolean isEnabled(Level testLevel, Marker marker, String msg)
ExtendedLogger
testLevel
- The logging Level to check.marker
- A Marker or null.msg
- The message.public boolean isEnabled(Level testLevel, Marker marker, String msg, Object... p1)
ExtendedLogger
testLevel
- The logging Level to check.marker
- A Marker or null.msg
- The message.p1
- The parameters.public boolean isEnabled(Level testLevel, Marker marker, String message, Object p0)
ExtendedLogger
testLevel
- The logging Level to check.marker
- A Marker or null.message
- The message.p0
- the message parameterspublic boolean isEnabled(Level testLevel, Marker marker, String message, Object p0, Object p1)
ExtendedLogger
testLevel
- The logging Level to check.marker
- A Marker or null.message
- The message.p0
- the message parametersp1
- the message parameterspublic boolean isEnabled(Level testLevel, Marker marker, String message, Object p0, Object p1, Object p2)
ExtendedLogger
testLevel
- The logging Level to check.marker
- A Marker or null.message
- The message.p0
- the message parametersp1
- the message parametersp2
- the message parameterspublic boolean isEnabled(Level testLevel, Marker marker, String message, Object p0, Object p1, Object p2, Object p3)
ExtendedLogger
testLevel
- The logging Level to check.marker
- A Marker or null.message
- The message.p0
- the message parametersp1
- the message parametersp2
- the message parametersp3
- the message parameterspublic boolean isEnabled(Level testLevel, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4)
ExtendedLogger
testLevel
- The logging Level to check.marker
- A Marker or null.message
- The message.p0
- the message parametersp1
- the message parametersp2
- the message parametersp3
- the message parametersp4
- the message parameterspublic boolean isEnabled(Level testLevel, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5)
ExtendedLogger
testLevel
- The logging Level to check.marker
- A Marker or null.message
- The message.p0
- the message parametersp1
- the message parametersp2
- the message parametersp3
- the message parametersp4
- the message parametersp5
- the message parameterspublic boolean isEnabled(Level testLevel, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6)
ExtendedLogger
testLevel
- The logging Level to check.marker
- A Marker or null.message
- The message.p0
- the message parametersp1
- the message parametersp2
- the message parametersp3
- the message parametersp4
- the message parametersp5
- the message parametersp6
- the message parameterspublic boolean isEnabled(Level testLevel, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7)
ExtendedLogger
testLevel
- The logging Level to check.marker
- A Marker or null.message
- The message.p0
- the message parametersp1
- the message parametersp2
- the message parametersp3
- the message parametersp4
- the message parametersp5
- the message parametersp6
- the message parametersp7
- the message parameterspublic boolean isEnabled(Level testLevel, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8)
ExtendedLogger
testLevel
- The logging Level to check.marker
- A Marker or null.message
- The message.p0
- the message parametersp1
- the message parametersp2
- the message parametersp3
- the message parametersp4
- the message parametersp5
- the message parametersp6
- the message parametersp7
- the message parametersp8
- the message parameterspublic boolean isEnabled(Level testLevel, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8, Object p9)
ExtendedLogger
testLevel
- The logging Level to check.marker
- A Marker or null.message
- The message.p0
- the message parametersp1
- the message parametersp2
- the message parametersp3
- the message parametersp4
- the message parametersp5
- the message parametersp6
- the message parametersp7
- the message parametersp8
- the message parametersp9
- the message parameterspublic boolean isEnabled(Level testLevel, Marker marker, String msg, Throwable t)
ExtendedLogger
testLevel
- The logging Level to check.marker
- A Marker or null.msg
- The message.t
- the exception to log, including its stack trace.public void logMessage(String fqcn, Level mgsLevel, Marker marker, Message msg, Throwable throwable)
ExtendedLogger
fqcn
- The fully qualified class name of the logger entry point, used to determine the caller class and
method when location information needs to be logged.mgsLevel
- The logging Level to check.marker
- A Marker or null.msg
- The Message.throwable
- the exception to log, including its stack trace.public void setStream(PrintStream stream)
Copyright © 1999-1969 The Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.