| java.lang.Object gov.nist.siplite.stack.ServerLog
ServerLog | public class ServerLog (Code) | | 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).
version: JAIN-SIP-1.1 version: This code is in the public domain. |
Method Summary | |
public static void | checkLogFile() Checks for valid logging output destination. | public static int | getTraceLevel() Gets the trace level for the stack. | public static void | logException(Exception ex) Logs an exception stack trace. | public static void | logMessage(String message) Logs a message into the log file. | public static synchronized void | logMessage(String message, String from, String to, boolean sender, String callId, String firstLine, String status, String tid, String time) Logs a message into the log directory. | public static synchronized void | logMessage(String message, String from, String to, boolean sender, String callId, String firstLine, String status, String tid, long time) Logs a message into the log directory. | public static void | logMessage(String message, String from, String to, boolean sender, String callId, String firstLine, String status, String tid) Logs a message into the log directory. | public static void | logMessage(Message message, String from, String to, boolean sender, String time) Logs a message into the log directory. | public static void | logMessage(Message message, String from, String to, boolean sender, long time) Logs a message into the log directory. | public static void | logMessage(Message message, String from, String to, boolean sender) Logs a message into the log directory. | public static void | logMessage(Message message, String from, String to, String status, boolean sender, String time) Logs a message into the log directory.
Parameters: message - a Message to log Parameters: from - from header of the message to log into the log directory Parameters: to - to header of the message to log into the log directory Parameters: status - the status to log. | public static void | logMessage(Message message, String from, String to, String status, boolean sender, long time) Logs a message into the log directory.
Parameters: message - a Message to log Parameters: from - from header of the message to log into the log directory Parameters: to - to header of the message to log into the log directory Parameters: status - the status to log. | public static void | logMessage(Message message, String from, String to, String status, boolean sender) Logs a message into the log directory. | public static boolean | needsLogging(int logLevel) Checks to see if logging is enabled at a level (avoids
unecessary message formatting.
Parameters: logLevel - level at which to check. | public static boolean | needsLogging() Global check for whether to log or not. | public static void | setAuxInfo(String auxInfo) Sets aux information. | public static void | setDescription(String desc) Sets the descriptive String for the log. | public static void | setLogFileName(String loggerURL) Sets the log file name. | public static void | setTraceLevel(int level) Sets the trace level for the stack.
Parameters: level - -- the trace level to set. |
TRACE_DEBUG | public static int TRACE_DEBUG(Code) | | Debug trace level (all tracing enabled).
|
TRACE_EXCEPTION | public static int TRACE_EXCEPTION(Code) | | Trace exception processing.
|
TRACE_MESSAGES | public static int TRACE_MESSAGES(Code) | | Trace messages.
|
TRACE_NONE | public static int TRACE_NONE(Code) | | Dont trace
|
auxInfo | protected static String auxInfo(Code) | | Auxililary information to log with this trace.
|
description | protected static String description(Code) | | Desription for mesasge.
|
printWriter | protected static PrintStream printWriter(Code) | | Print stream for writing out debug messages.
|
stackIpAddress | protected static String stackIpAddress(Code) | | Stack pointer for mesasge.
|
traceLevel | protected static int traceLevel(Code) | | Default trace level.
|
traceWriter | protected static PrintStream traceWriter(Code) | | Print stream for writing out tracing messages.
|
checkLogFile | public static void checkLogFile()(Code) | | Checks for valid logging output destination.
|
getTraceLevel | public static int getTraceLevel()(Code) | | Gets the trace level for the stack.
the trace level |
logException | public static void logException(Exception ex)(Code) | | Logs an exception stack trace.
Parameters: ex - Exception to log into the log file |
logMessage | public static void logMessage(String message)(Code) | | Logs a message into the log file.
Parameters: message - message to log into the log file. |
logMessage | public static synchronized void logMessage(String message, String from, String to, boolean sender, String callId, String firstLine, String status, String tid, String time)(Code) | | Logs a message into the log directory.
Parameters: message - a Message to log Parameters: from - from header of the message to log into the log directory Parameters: to - to header of the message to log into the log directory Parameters: sender - is the server the sender (true if I am the sender). Parameters: callId - CallId of the message to log into the log directory. Parameters: firstLine - First line of the message to display Parameters: status - Status information (generated while processing message). Parameters: tid - is the transaction id for the message. Parameters: time - the reception time (or date). |
logMessage | public static synchronized void logMessage(String message, String from, String to, boolean sender, String callId, String firstLine, String status, String tid, long time)(Code) | | Logs a message into the log directory.
Parameters: message - a Message to log Parameters: from - from header of the message to log into the log directory Parameters: to - to header of the message to log into the log directory Parameters: sender - is the server the sender (true if I am the sender). Parameters: callId - CallId of the message to log into the log directory. Parameters: firstLine - First line of the message to display Parameters: status - Status information (generated while processing message). Parameters: tid - is the transaction id for the message. Parameters: time - the reception time (or date). |
logMessage | public static void logMessage(String message, String from, String to, boolean sender, String callId, String firstLine, String status, String tid)(Code) | | Logs a message into the log directory.
Parameters: message - a Message to log Parameters: from - from header of the message to log into the log directory Parameters: to - to header of the message to log into the log directory Parameters: sender - is the server the sender Parameters: callId - CallId of the message to log into the log directory. Parameters: firstLine - First line of the message to display Parameters: status - Status information (generated while processing message). Parameters: tid - is the transaction id for the message. |
logMessage | public static void logMessage(Message message, String from, String to, boolean sender, String time)(Code) | | Logs a message into the log directory. Status information is extracted
from the NISTExtension Header.
Parameters: message - a Message to log Parameters: from - from header of the message to log into the log directory Parameters: to - to header of the message to log into the log directory Parameters: sender - is the server the sender Parameters: time - is the time to associate with the message. |
logMessage | public static void logMessage(Message message, String from, String to, boolean sender, long time)(Code) | | Logs a message into the log directory.
Status information is extracted from the NISTExtension Header.
Parameters: message - a Message to log Parameters: from - from header of the message to log into the log directory Parameters: to - to header of the message to log into the log directory Parameters: sender - is the server the sender Parameters: time - is the time to associate with the message. |
logMessage | public static void logMessage(Message message, String from, String to, boolean sender)(Code) | | Logs a message into the log directory. Status information is extracted
from SIPExtension header. The time associated with the message is the
current time.
Parameters: message - a Message to log Parameters: from - from header of the message to log into the log directory Parameters: to - to header of the message to log into the log directory Parameters: sender - is the server the sender |
logMessage | public static void logMessage(Message message, String from, String to, String status, boolean sender, String time)(Code) | | Logs a message into the log directory.
Parameters: message - a Message to log Parameters: from - from header of the message to log into the log directory Parameters: to - to header of the message to log into the log directory Parameters: status - the status to log. This is appended to any NISTExtensionheader present in the message. Parameters: sender - is the server the sender or receiver (true if sender). Parameters: time - is the reception time. |
logMessage | public static void logMessage(Message message, String from, String to, String status, boolean sender, long time)(Code) | | Logs a message into the log directory.
Parameters: message - a Message to log Parameters: from - from header of the message to log into the log directory Parameters: to - to header of the message to log into the log directory Parameters: status - the status to log. This is appended to any NISTExtensionheader present in the message. Parameters: sender - is the server the sender or receiver (true if sender). Parameters: time - is the reception time. |
logMessage | public static void logMessage(Message message, String from, String to, String status, boolean sender)(Code) | | Logs a message into the log directory. Time stamp associated with the
message is the current time.
Parameters: message - a Message to log Parameters: from - from header of the message to log into the log directory Parameters: to - to header of the message to log into the log directory Parameters: status - the status to log. Parameters: sender - is the server the sender or receiver (true if sender). |
needsLogging | public static boolean needsLogging(int logLevel)(Code) | | Checks to see if logging is enabled at a level (avoids
unecessary message formatting.
Parameters: logLevel - level at which to check. true if tracing the requested logging level |
needsLogging | public static boolean needsLogging()(Code) | | Global check for whether to log or not. ToHeader minimize the time
return false here.
true -- if logging is globally enabled and false otherwise. |
setAuxInfo | public static void setAuxInfo(String auxInfo)(Code) | | Sets aux information. Auxiliary information may be associated
with the log file. This is useful for remote logs.
Parameters: auxInfo - -- auxiliary information. |
setDescription | public static void setDescription(String desc)(Code) | | Sets the descriptive String for the log.
Parameters: desc - is the descriptive string. |
setLogFileName | public static void setLogFileName(String loggerURL)(Code) | | Sets the log file name. (need revisit)
Parameters: loggerURL - is the name of the log file to set. |
setTraceLevel | public static void setTraceLevel(int level)(Code) | | Sets the trace level for the stack.
Parameters: level - -- the trace level to set. The following trace levels aresupported:- 0 -- no tracing
- 16 -- trace messages only
- 32 Full tracing including debug messages.
|
|
|