Package org.owasp.esapi.logging.log4j
Class Log4JLogger
- java.lang.Object
-
- org.owasp.esapi.logging.log4j.Log4JLogger
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.owasp.esapi.Logger
Logger.EventType
-
-
Field Summary
-
Fields inherited from interface org.owasp.esapi.Logger
ALL, DEBUG, ERROR, EVENT_FAILURE, EVENT_SUCCESS, EVENT_UNSPECIFIED, FATAL, INFO, OFF, SECURITY_AUDIT, SECURITY_FAILURE, SECURITY_SUCCESS, TRACE, WARNING
-
-
Constructor Summary
Constructors Constructor Description Log4JLogger(org.apache.log4j.Logger slf4JLogger, Log4JLogBridge bridge, int defaultEsapiLevel)
Deprecated.Constructs a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
always(Logger.EventType type, java.lang.String message)
Deprecated.Log an event regardless of what logging level is enabled.void
always(Logger.EventType type, java.lang.String message, java.lang.Throwable throwable)
Deprecated.Log an event regardless of what logging level is enabled and also record the stack trace associated with the event.void
debug(Logger.EventType type, java.lang.String message)
Deprecated.Log a debug level security event if 'debug' level logging is enabled.void
debug(Logger.EventType type, java.lang.String message, java.lang.Throwable throwable)
Deprecated.Log a debug level security event if 'debug' level logging is enabled and also record the stack trace associated with the event.void
error(Logger.EventType type, java.lang.String message)
Deprecated.Log an error level security event if 'error' level logging is enabled.void
error(Logger.EventType type, java.lang.String message, java.lang.Throwable throwable)
Deprecated.Log an error level security event if 'error' level logging is enabled and also record the stack trace associated with the event.void
fatal(Logger.EventType type, java.lang.String message)
Deprecated.Log a fatal event if 'fatal' level logging is enabled.void
fatal(Logger.EventType type, java.lang.String message, java.lang.Throwable throwable)
Deprecated.Log a fatal level security event if 'fatal' level logging is enabled and also record the stack trace associated with the event.int
getESAPILevel()
Deprecated.Retrieve the current ESAPI logging level for this logger.void
info(Logger.EventType type, java.lang.String message)
Deprecated.Log an info level security event if 'info' level logging is enabled.void
info(Logger.EventType type, java.lang.String message, java.lang.Throwable throwable)
Deprecated.Log an info level security event if 'info' level logging is enabled and also record the stack trace associated with the event.boolean
isDebugEnabled()
Deprecated.Allows the caller to determine if messages logged at this level will be discarded, to avoid performing expensive processing.boolean
isErrorEnabled()
Deprecated.Allows the caller to determine if messages logged at this level will be discarded, to avoid performing expensive processing.boolean
isFatalEnabled()
Deprecated.Allows the caller to determine if messages logged at this level will be discarded, to avoid performing expensive processing.boolean
isInfoEnabled()
Deprecated.Allows the caller to determine if messages logged at this level will be discarded, to avoid performing expensive processing.boolean
isTraceEnabled()
Deprecated.Allows the caller to determine if messages logged at this level will be discarded, to avoid performing expensive processing.boolean
isWarningEnabled()
Deprecated.Allows the caller to determine if messages logged at this level will be discarded, to avoid performing expensive processing.void
setLevel(int level)
Deprecated.Dynamically set the ESAPI logging severity level.void
trace(Logger.EventType type, java.lang.String message)
Deprecated.Log a trace level security event if 'trace' level logging is enabled.void
trace(Logger.EventType type, java.lang.String message, java.lang.Throwable throwable)
Deprecated.Log a trace level security event if 'trace' level logging is enabled and also record the stack trace associated with the event.void
warning(Logger.EventType type, java.lang.String message)
Deprecated.Log a warning level security event if 'warning' level logging is enabled.void
warning(Logger.EventType type, java.lang.String message, java.lang.Throwable throwable)
Deprecated.Log a warning level security event if 'warning' level logging is enabled and also record the stack trace associated with the event.
-
-
-
Constructor Detail
-
Log4JLogger
public Log4JLogger(org.apache.log4j.Logger slf4JLogger, Log4JLogBridge bridge, int defaultEsapiLevel)
Deprecated.Constructs a new instance.- Parameters:
slf4JLogger
- Delegate SLF4J logger.bridge
- Translator for ESAPI -> SLF4J logging events.defaultEsapiLevel
- Maximum ESAPI log level events to propagate.
-
-
Method Detail
-
always
public void always(Logger.EventType type, java.lang.String message)
Deprecated.Description copied from interface:Logger
Log an event regardless of what logging level is enabled.
Note that logging will not occur if the underlying logging implementation has logging disabled.
-
always
public void always(Logger.EventType type, java.lang.String message, java.lang.Throwable throwable)
Deprecated.Description copied from interface:Logger
Log an event regardless of what logging level is enabled and also record the stack trace associated with the event.
Note that logging will not occur if the underlying logging implementation has logging disabled.
-
trace
public void trace(Logger.EventType type, java.lang.String message)
Deprecated.Description copied from interface:Logger
Log a trace level security event if 'trace' level logging is enabled.
-
trace
public void trace(Logger.EventType type, java.lang.String message, java.lang.Throwable throwable)
Deprecated.Description copied from interface:Logger
Log a trace level security event if 'trace' level logging is enabled and also record the stack trace associated with the event.
-
debug
public void debug(Logger.EventType type, java.lang.String message)
Deprecated.Description copied from interface:Logger
Log a debug level security event if 'debug' level logging is enabled.
-
debug
public void debug(Logger.EventType type, java.lang.String message, java.lang.Throwable throwable)
Deprecated.Description copied from interface:Logger
Log a debug level security event if 'debug' level logging is enabled and also record the stack trace associated with the event.
-
info
public void info(Logger.EventType type, java.lang.String message)
Deprecated.Description copied from interface:Logger
Log an info level security event if 'info' level logging is enabled.
-
info
public void info(Logger.EventType type, java.lang.String message, java.lang.Throwable throwable)
Deprecated.Description copied from interface:Logger
Log an info level security event if 'info' level logging is enabled and also record the stack trace associated with the event.
-
warning
public void warning(Logger.EventType type, java.lang.String message)
Deprecated.Description copied from interface:Logger
Log a warning level security event if 'warning' level logging is enabled.
-
warning
public void warning(Logger.EventType type, java.lang.String message, java.lang.Throwable throwable)
Deprecated.Description copied from interface:Logger
Log a warning level security event if 'warning' level logging is enabled and also record the stack trace associated with the event.
-
error
public void error(Logger.EventType type, java.lang.String message)
Deprecated.Description copied from interface:Logger
Log an error level security event if 'error' level logging is enabled.
-
error
public void error(Logger.EventType type, java.lang.String message, java.lang.Throwable throwable)
Deprecated.Description copied from interface:Logger
Log an error level security event if 'error' level logging is enabled and also record the stack trace associated with the event.
-
fatal
public void fatal(Logger.EventType type, java.lang.String message)
Deprecated.Description copied from interface:Logger
Log a fatal event if 'fatal' level logging is enabled.
-
fatal
public void fatal(Logger.EventType type, java.lang.String message, java.lang.Throwable throwable)
Deprecated.Description copied from interface:Logger
Log a fatal level security event if 'fatal' level logging is enabled and also record the stack trace associated with the event.
-
getESAPILevel
public int getESAPILevel()
Deprecated.Description copied from interface:Logger
Retrieve the current ESAPI logging level for this logger. SeeLog4JLogger
for an explanation of why this method is not simply calledgetLevel()
.- Specified by:
getESAPILevel
in interfaceLogger
- Returns:
- The current logging level.
-
isTraceEnabled
public boolean isTraceEnabled()
Deprecated.Description copied from interface:Logger
Allows the caller to determine if messages logged at this level will be discarded, to avoid performing expensive processing.- Specified by:
isTraceEnabled
in interfaceLogger
- Returns:
- true if trace level messages will be output to the log
-
isDebugEnabled
public boolean isDebugEnabled()
Deprecated.Description copied from interface:Logger
Allows the caller to determine if messages logged at this level will be discarded, to avoid performing expensive processing.- Specified by:
isDebugEnabled
in interfaceLogger
- Returns:
- true if debug level messages will be output to the log
-
isInfoEnabled
public boolean isInfoEnabled()
Deprecated.Description copied from interface:Logger
Allows the caller to determine if messages logged at this level will be discarded, to avoid performing expensive processing.- Specified by:
isInfoEnabled
in interfaceLogger
- Returns:
- true if info level messages will be output to the log
-
isWarningEnabled
public boolean isWarningEnabled()
Deprecated.Description copied from interface:Logger
Allows the caller to determine if messages logged at this level will be discarded, to avoid performing expensive processing.- Specified by:
isWarningEnabled
in interfaceLogger
- Returns:
- true if warning level messages will be output to the log
-
isErrorEnabled
public boolean isErrorEnabled()
Deprecated.Description copied from interface:Logger
Allows the caller to determine if messages logged at this level will be discarded, to avoid performing expensive processing.- Specified by:
isErrorEnabled
in interfaceLogger
- Returns:
- true if error level messages will be output to the log
-
isFatalEnabled
public boolean isFatalEnabled()
Deprecated.Description copied from interface:Logger
Allows the caller to determine if messages logged at this level will be discarded, to avoid performing expensive processing.- Specified by:
isFatalEnabled
in interfaceLogger
- Returns:
- true if fatal level messages will be output to the log
-
setLevel
public void setLevel(int level)
Deprecated.Description copied from interface:Logger
Dynamically set the ESAPI logging severity level. All events of this level and higher will be logged from this point forward for all logs. All events below this level will be discarded.
-
-