|
NIST SIP Parser and Stack (v1.2) API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gov.nist.javax.sip.stack.ServerLog
Log file wrapper class. Log messages into the message trace file and also write the log into the debug file if needed. This class keeps an XML formatted trace around for later access via RMI. The trace can be viewed with a trace viewer (see tools.traceviewerapp).
Field Summary | |
static int |
TRACE_DEBUG
Debug trace level (all tracing enabled). |
static int |
TRACE_EXCEPTION
Trace exception processing |
static int |
TRACE_MESSAGES
|
static int |
TRACE_NONE
Dont trace |
Constructor Summary | |
ServerLog()
|
Method Summary | |
static void |
checkLogFile()
|
static void |
commitRemoteLog()
Commit the log information to the remote repository. |
static String |
getLogFileName()
return the name of the log file. |
static gov.nist.javax.sip.stack.MessageLogTableImpl |
getMessageLogTable()
Return the message log table. |
static int |
getTraceLevel()
Get the trace level for the stack. |
static void |
initMessageLogTable(String stackAddress,
int rmiPort,
String rootName,
int traceLifeTime)
Initialize the table for RMI access to the log file. |
static void |
logException(Exception ex)
Log an exception stack trace. |
static void |
logMessage(gov.nist.javax.sip.message.SIPMessage message,
String from,
String to,
boolean sender)
Log a message into the log directory. |
static void |
logMessage(gov.nist.javax.sip.message.SIPMessage message,
String from,
String to,
boolean sender,
long time)
Log a message into the log directory. |
static void |
logMessage(gov.nist.javax.sip.message.SIPMessage message,
String from,
String to,
boolean sender,
String time)
Log a message into the log directory. |
static void |
logMessage(gov.nist.javax.sip.message.SIPMessage message,
String from,
String to,
String status,
boolean sender)
Log a message into the log directory. |
static void |
logMessage(gov.nist.javax.sip.message.SIPMessage message,
String from,
String to,
String status,
boolean sender,
long time)
Log a message into the log directory. |
static void |
logMessage(gov.nist.javax.sip.message.SIPMessage message,
String from,
String to,
String status,
boolean sender,
String time)
Log a message into the log directory. |
static void |
logMessage(String message)
Log a message into the log file. |
static void |
logMessage(String message,
String from,
String to,
String cseq,
boolean sender,
String callId,
String firstLine,
String status,
String tid)
Log a message into the log directory. |
static void |
logMessage(String message,
String from,
String to,
String cseq,
boolean sender,
String callId,
String firstLine,
String status,
String tid,
long time)
|
static void |
logMessage(String message,
String from,
String to,
String cseq,
boolean sender,
String callId,
String firstLine,
String status,
String tid,
String time)
Log a message into the log directory. |
static boolean |
needsLogging()
Global check for whether to log or not. |
static boolean |
needsLogging(int logLevel)
Check to see if logging is enabled at a level (avoids unecessary message formatting. |
static void |
println(String s)
print a line to stdout if the traceLevel is TRACE_DEBUG. |
static void |
setAuxInfo(String auxInfo)
Set aux information. |
static void |
setDescription(String desc)
Set the descriptive String for the log. |
static void |
setLogFileName(String name)
Set the log file name |
static void |
setLogName(String name)
Set the name to assign for the log. |
static void |
setRemoteRepository(String repositoryName)
Set the remote repository name. |
static void |
setTraceLevel(int level)
Set the trace level for the stack. |
static void |
traceMsg(int msgLevel,
String tracemsg)
Log a message into the log file. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static int TRACE_NONE
public static int TRACE_MESSAGES
public static int TRACE_EXCEPTION
public static int TRACE_DEBUG
Constructor Detail |
public ServerLog()
Method Detail |
public static void checkLogFile()
public static boolean needsLogging(int logLevel)
logLevel
- level at which to check.public static boolean needsLogging()
public static void setLogFileName(String name)
name
- is the name of the log file to set.public static String getLogFileName()
public static void logMessage(String message)
message
- message to log into the log file.public static void logMessage(String message, String from, String to, String cseq, boolean sender, String callId, String firstLine, String status, String tid, String time)
message
- 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 directorycseq
- cseq header of the message to log into the log directorysender
- is the server the sender (true if I am the sender).callId
- CallId of the message to log into the log directory.firstLine
- First line of the message to displaystatus
- Status information (generated while processing message).time
- the reception time (or date).public static void logMessage(String message, String from, String to, String cseq, boolean sender, String callId, String firstLine, String status, String tid, long time)
public static void logMessage(String message, String from, String to, String cseq, boolean sender, String callId, String firstLine, String status, String tid)
message
- 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 directorycseq
- cseq header of the message to log into the log directorysender
- is the server the sendercallId
- CallId of the message to log into the log directory.firstLine
- First line of the message to displaystatus
- Status information (generated while processing message).tid
- is the transaction id for the message.public static void logMessage(gov.nist.javax.sip.message.SIPMessage message, String from, String to, boolean sender, String time)
message
- 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 static void logMessage(gov.nist.javax.sip.message.SIPMessage message, String from, String to, boolean sender, long time)
message
- 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 static void logMessage(gov.nist.javax.sip.message.SIPMessage message, String from, String to, boolean sender)
message
- 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 senderpublic static void logMessage(gov.nist.javax.sip.message.SIPMessage message, String from, String to, String status, boolean sender, String time)
message
- 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. This is appended to any NISTExtension
header present in the message.sender
- is the server the sender or receiver (true if sender).time
- is the reception time.public static void logMessage(gov.nist.javax.sip.message.SIPMessage message, String from, String to, String status, boolean sender, long time)
message
- 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. This is appended to any NISTExtension
header present in the message.sender
- is the server the sender or receiver (true if sender).time
- is the reception time.public static void logMessage(gov.nist.javax.sip.message.SIPMessage message, String from, String to, String status, boolean sender)
message
- 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 static void traceMsg(int msgLevel, String tracemsg)
msgLevel
- Logging level for this message.tracemsg
- message to write out.public static void logException(Exception ex)
ex
- Exception to log into the log filepublic static void setLogName(String name)
public static void initMessageLogTable(String stackAddress, int rmiPort, String rootName, int traceLifeTime) throws RemoteException
rmiPort
- is the RMI registry port.
RemoteException
public static gov.nist.javax.sip.stack.MessageLogTableImpl getMessageLogTable()
public static void println(String s)
s
- String to print out.public static void setTraceLevel(int level)
level
- -- the trace level to set. The following trace levels are
supported:
public static int getTraceLevel()
public static void setRemoteRepository(String repositoryName)
public static void setAuxInfo(String auxInfo)
auxInfo
- -- auxiliary information.public static void setDescription(String desc)
desc
- is the descriptive string.public static void commitRemoteLog()
|
NIST SIP Parser and Stack (v1.2) API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |