All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.server.log.TraceLog

java.lang.Object
   |
   +----com.sun.server.log.Log
           |
           +----com.sun.server.log.TraceLog

public class TraceLog
extends Log
A class for logging server trace information. This class implements an unlimited number of logging levels. The default level, if unspecified in a write, is 2.


Constructor Index

 o TraceLog()
Creates a new trace log object.
 o TraceLog(OutputStream)
Creates a new trace log using the specified output stream.

Method Index

 o setOutputStream(OutputStream)
Sets logging output to the specified output stream.
 o write(int, String)
Writes a message to the log file if the current logging level is greater than or equal to the specified level.
 o write(int, Throwable)
Writes an error or exception to the log file if the current logging level is greater than or equal to the specified level.
 o write(String)
Writes a message to the log file if the current logging level is greater than or equal to 2.
 o write(Throwable)
Writes an error or exception to the log file if the current logging level is greater than or equal to 2.

Constructors

 o TraceLog
 public TraceLog()
Creates a new trace log object.

 o TraceLog
 public TraceLog(OutputStream out)
Creates a new trace log using the specified output stream.

Parameters:
out - the output stream to write to

Methods

 o setOutputStream
 public void setOutputStream(OutputStream out)
Sets logging output to the specified output stream.

Parameters:
out - the output stream
Overrides:
setOutputStream in class Log
 o write
 public void write(String s)
Writes a message to the log file if the current logging level is greater than or equal to 2.

Parameters:
s - the message to write
 o write
 public synchronized void write(int level,
                                String s)
Writes a message to the log file if the current logging level is greater than or equal to the specified level. A date string will be prepended to the message line that is output.

Parameters:
level - the level for this message
s - the message to write
 o write
 public void write(Throwable e)
Writes an error or exception to the log file if the current logging level is greater than or equal to 2.

Parameters:
s - the error or exception to write
 o write
 public synchronized void write(int level,
                                Throwable t)
Writes an error or exception to the log file if the current logging level is greater than or equal to the specified level.

Parameters:
level - the level for this message
t - the error or exception to write

All Packages  Class Hierarchy  This Package  Previous  Next  Index