public class ServerLog extends Object implements ServerLogger
| Modifier and Type | Field and Description |
|---|---|
protected StackLogger |
stackLogger |
protected int |
traceLevel
default trace level
|
TRACE_DEBUG, TRACE_ERROR, TRACE_EXCEPTION, TRACE_FATAL, TRACE_INFO, TRACE_MESSAGES, TRACE_NONE, TRACE_TRACE, TRACE_WARN| Constructor and Description |
|---|
ServerLog() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkLogFile() |
void |
closeLogFile() |
String |
getLogFileName()
return the name of the log file.
|
int |
getTraceLevel()
Get the trace level for the stack.
|
void |
logException(Exception ex)
Log an exception stack trace.
|
void |
logMessage(SIPMessage message,
String from,
String to,
boolean sender,
long time)
Log a message into the log directory.
|
void |
logMessage(SIPMessage message,
String from,
String to,
String status,
boolean sender)
Log a message into the log directory.
|
void |
logMessage(SIPMessage message,
String from,
String to,
String status,
boolean sender,
long time)
Log a message into the log directory.
|
boolean |
needsLogging()
Global check for whether to log or not.
|
void |
setAuxInfo(String auxInfo)
Set aux information.
|
void |
setLevel(int jsipLoggingLevel) |
void |
setLogFileName(String name)
Set the log file name
|
void |
setSipStack(SipStack sipStack) |
void |
setStackIpAddress(String ipAddress) |
void |
setStackProperties(Properties stackProperties) |
void |
setTraceLevel(int level)
Set the trace level for the stack.
|
protected StackLogger stackLogger
protected int traceLevel
public void setStackIpAddress(String ipAddress)
public void closeLogFile()
closeLogFile in interface ServerLoggerpublic void checkLogFile()
public boolean needsLogging()
public void setLogFileName(String name)
name - is the name of the log file to set.public String getLogFileName()
public void logMessage(SIPMessage message, String from, String to, boolean sender, long time)
logMessage in interface ServerLoggermessage - a SIPMessage to logfrom - from header of the message to log into the log directoryto - to header of the message to log into the log directorysender - is the server the sendertime - is the time to associate with the message.public void logMessage(SIPMessage message, String from, String to, String status, boolean sender, long time)
logMessage in interface ServerLoggermessage - a SIPMessage to logfrom - from header of the message to log into the log directoryto - to header of the message to log into the log directorystatus - the status to log.sender - is the server the sender or receiver (true if sender).time - is the reception time.public void logMessage(SIPMessage message, String from, String to, String status, boolean sender)
logMessage in interface ServerLoggermessage - a SIPMessage to logfrom - from header of the message to log into the log directoryto - to header of the message to log into the log directorystatus - the status to log.sender - is the server the sender or receiver (true if sender).public void logException(Exception ex)
logException in interface ServerLoggerex - Exception to log into the log filepublic void setTraceLevel(int level)
level - -- the trace level to set. The following trace levels are supported:
public int getTraceLevel()
public void setAuxInfo(String auxInfo)
auxInfo - -- auxiliary information.public void setSipStack(SipStack sipStack)
setSipStack in interface ServerLoggerpublic void setStackProperties(Properties stackProperties)
setStackProperties in interface ServerLoggerpublic void setLevel(int jsipLoggingLevel)
Copyright © 2018. All Rights Reserved.