public class StackLoggerImpl extends Object implements StackLogger
TRACE_DEBUG, TRACE_ERROR, TRACE_EXCEPTION, TRACE_FATAL, TRACE_INFO, TRACE_MESSAGES, TRACE_NONE, TRACE_TRACE, TRACE_WARN
Constructor and Description |
---|
StackLoggerImpl() |
Modifier and Type | Method and Description |
---|---|
void |
disableLogging()
Disable logging altogether.
|
void |
enableLogging()
Enable logging (globally).
|
int |
getLineCount()
Get the line count in the log stream.
|
String |
getLoggerName()
The category for the logger.
|
boolean |
isLoggingEnabled() |
boolean |
isLoggingEnabled(int sipLogLevel)
Return true/false if loging is enabled at a given level.
|
void |
logDebug(String string)
Log a message into the log file.
|
void |
logDebug(String string,
Exception ex)
Log a message into the log file.
|
void |
logError(String string)
Log an error message.
|
void |
logError(String string,
Exception exception)
Log an error message.
|
void |
logException(Throwable throwable)
Log an exception.
|
void |
logFatalError(String string)
Log an error message.
|
void |
logInfo(String string)
Log an info message.
|
void |
logStackTrace()
log a stack trace.
|
void |
logStackTrace(int level)
Log a stack trace if the current logging level exceeds
given trace level.
|
void |
logTrace(String message)
Log a message into the log file.
|
void |
logWarning(String message)
Log a warning mesasge.
|
void |
setBuildTimeStamp(String timeStamp)
Set the build time stamp.
|
static void |
setLogger(org.apache.log4j.Logger logger) |
void |
setStackProperties(Properties properties)
Stack creation properties.
|
public static void setLogger(org.apache.log4j.Logger logger)
public void disableLogging()
StackLogger
disableLogging
in interface StackLogger
public void enableLogging()
StackLogger
enableLogging
in interface StackLogger
public int getLineCount()
StackLogger
getLineCount
in interface StackLogger
public boolean isLoggingEnabled()
isLoggingEnabled
in interface StackLogger
public boolean isLoggingEnabled(int sipLogLevel)
StackLogger
isLoggingEnabled
in interface StackLogger
public void logDebug(String string)
StackLogger
logDebug
in interface StackLogger
string
- message to log into the log file.public void logDebug(String string, Exception ex)
StackLogger
logDebug
in interface StackLogger
string
- message to log into the log file.public void logError(String string)
StackLogger
logError
in interface StackLogger
string
- --
error message to log.public void logError(String string, Exception exception)
StackLogger
logError
in interface StackLogger
public void logException(Throwable throwable)
StackLogger
logException
in interface StackLogger
public void logFatalError(String string)
StackLogger
logFatalError
in interface StackLogger
string
- --
error message to log.public void logInfo(String string)
StackLogger
logInfo
in interface StackLogger
public void logStackTrace()
StackLogger
logStackTrace
in interface StackLogger
public void logStackTrace(int level)
StackLogger
logStackTrace
in interface StackLogger
public void logWarning(String message)
StackLogger
logWarning
in interface StackLogger
public void logTrace(String message)
StackLogger
logTrace
in interface StackLogger
message
- message to log into the log file.public void setBuildTimeStamp(String timeStamp)
StackLogger
setBuildTimeStamp
in interface StackLogger
public void setStackProperties(Properties properties)
StackLogger
setStackProperties
in interface StackLogger
public String getLoggerName()
StackLogger
getLoggerName
in interface StackLogger
Copyright © 2018. All Rights Reserved.