NIST SIP Parser and Stack (v1.2) API

gov.nist.core
Class LogWriter

java.lang.Object
  |
  +--gov.nist.core.LogWriter

public class LogWriter
extends Object

Log System Errors. Also used for debugging log.

Version:
JAIN-SIP-1.1
Author:
M. Ranganathan
This code is in the public domain.

Field Summary
static boolean needsLogging
          Flag to indicate that logging is enabled.
static PrintWriter printWriter
          Print writer that is used to write out the log file.
static int TRACE_AUTHENTICATION
          Trace authentication sequences
static int TRACE_DEBUG
          Debug trace level (all tracing enabled).
static int TRACE_EXCEPTION
          Trace exception processing
static int TRACE_INITIALIZATION
          Trace initialization code
static int TRACE_MESSAGES
          Trace message processing
static int TRACE_NONE
          Dont trace
static PrintStream traceWriter
          print stream for writing out trace
 
Constructor Summary
LogWriter()
           
 
Method Summary
static int getTraceLevel()
          Get the trace level for the stack.
static void logException(Exception ex)
           
static void logMessage(int level, String message)
          Log a message into the log file.
static void logMessage(String message)
          Log a message into the log file.
static void logMessage(String message, String logFileName)
           
static void logStackTrace()
          log a stack trace..
static void logTrace(Throwable sframe)
          Log an excption. 1.4x Code contributed by Brad Templeton
static void setLogFileName(String name)
          Set the log file name
static void setTraceLevel(int level)
          Set the trace level for the stack.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRACE_NONE

public static int TRACE_NONE
Dont trace


TRACE_INITIALIZATION

public static int TRACE_INITIALIZATION
Trace initialization code


TRACE_AUTHENTICATION

public static int TRACE_AUTHENTICATION
Trace authentication sequences


TRACE_MESSAGES

public static int TRACE_MESSAGES
Trace message processing


TRACE_EXCEPTION

public static int TRACE_EXCEPTION
Trace exception processing


TRACE_DEBUG

public static int TRACE_DEBUG
Debug trace level (all tracing enabled).


printWriter

public static PrintWriter printWriter
Print writer that is used to write out the log file.


traceWriter

public static PrintStream traceWriter
print stream for writing out trace


needsLogging

public static boolean needsLogging
Flag to indicate that logging is enabled. This needs to be static and public in order to globally turn logging on or off. This is static for efficiency reasons (the java compiler will not generate the logging code if this is set to false).

Constructor Detail

LogWriter

public LogWriter()
Method Detail

logStackTrace

public static void logStackTrace()
log a stack trace..


logException

public static void logException(Exception ex)

logTrace

public static void logTrace(Throwable sframe)
Log an excption. 1.4x Code contributed by Brad Templeton

Parameters:
sframe - - frame to log grace.

setLogFileName

public static void setLogFileName(String name)
Set the log file name

Parameters:
name - is the name of the log file to set.

logMessage

public static void logMessage(String message,
                              String logFileName)

logMessage

public static void logMessage(int level,
                              String message)
Log a message into the log file.

Parameters:
message - message to log into the log file.

logMessage

public static void logMessage(String message)
Log a message into the log file.

Parameters:
message - message to log into the log file.

setTraceLevel

public static void setTraceLevel(int level)
Set the trace level for the stack.


getTraceLevel

public static int getTraceLevel()
Get the trace level for the stack.


NIST SIP Parser and Stack (v1.2) API

A product of the NIST/ITL Advanced Networking Technologies Division.
See conditions of use.
Get the latest distribution.
Submit a bug report or feature request.