Main Page | Packages | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ikayaki.util.LoggerPrintStream Class Reference

List of all members.

Public Member Functions

 LoggerPrintStream (OutputStream out)
 LoggerPrintStream (OutputStream out, PrintStream screen)
 LoggerPrintStream (OutputStream out, PrintStream screen, String message)
Override void print (boolean b)
Override void print (char c)
Override void print (int i)
Override void print (long l)
Override void print (float f)
Override void print (double d)
Override void print (char s[])
Override void print (String s)
Override void print (Object obj)
Override void println ()
Override void println (boolean x)
Override void println (char x)
Override void println (int x)
Override void println (long x)
Override void println (float x)
Override void println (double x)
Override void println (char x[])
Override void println (String x)
Override void println (Object x)

Private Member Functions

void timestamp ()

Private Attributes

DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss.SSS")
boolean lineStart = true
PrintStream screen

Detailed Description

PrintStream for directing the output to another PrintStream and a OutputStream. Can be used for printing System.err to screen and to a log file. Writes timestamps for each printed line.

Author:
Esko Luontola

Definition at line 15 of file LoggerPrintStream.java.


Constructor & Destructor Documentation

ikayaki.util.LoggerPrintStream.LoggerPrintStream OutputStream  out  ) 
 

Creates a timestamped print stream directed to one output.

Parameters:
out an OutputStream to direct all output with timestamps.

Definition at line 28 of file LoggerPrintStream.java.

ikayaki.util.LoggerPrintStream.LoggerPrintStream OutputStream  out,
PrintStream  screen
 

Creates a timestamped print stream directed to two outputs.

Parameters:
out an OutputStream to direct all output with timestamps.
screen a PrintStream to direct all output with timestamps. Will be ignored if null.

Definition at line 38 of file LoggerPrintStream.java.

ikayaki.util.LoggerPrintStream.LoggerPrintStream OutputStream  out,
PrintStream  screen,
String  message
 

Creates a timestamped print stream directed to two outputs with a startup message.

Parameters:
out an OutputStream to direct all output with timestamps.
screen a PrintStream to direct all output with timestamps. Will be ignored if null.
message a message to be printed at the creaton of this print stream. This will not be timestamped. Will be ignored if null.

Definition at line 50 of file LoggerPrintStream.java.


Member Function Documentation

Override void ikayaki.util.LoggerPrintStream.print Object  obj  ) 
 

Definition at line 138 of file LoggerPrintStream.java.

References ikayaki.util.LoggerPrintStream.screen, and ikayaki.util.LoggerPrintStream.timestamp().

Here is the call graph for this function:

Override void ikayaki.util.LoggerPrintStream.print String  s  ) 
 

Definition at line 130 of file LoggerPrintStream.java.

References ikayaki.util.LoggerPrintStream.screen, and ikayaki.util.LoggerPrintStream.timestamp().

Here is the call graph for this function:

Override void ikayaki.util.LoggerPrintStream.print char  s[]  ) 
 

Definition at line 122 of file LoggerPrintStream.java.

References ikayaki.util.LoggerPrintStream.screen, and ikayaki.util.LoggerPrintStream.timestamp().

Here is the call graph for this function:

Override void ikayaki.util.LoggerPrintStream.print double  d  ) 
 

Definition at line 114 of file LoggerPrintStream.java.

References ikayaki.util.LoggerPrintStream.screen, and ikayaki.util.LoggerPrintStream.timestamp().

Here is the call graph for this function:

Override void ikayaki.util.LoggerPrintStream.print float  f  ) 
 

Definition at line 106 of file LoggerPrintStream.java.

References ikayaki.util.LoggerPrintStream.screen, and ikayaki.util.LoggerPrintStream.timestamp().

Here is the call graph for this function:

Override void ikayaki.util.LoggerPrintStream.print long  l  ) 
 

Definition at line 98 of file LoggerPrintStream.java.

References ikayaki.util.LoggerPrintStream.screen, and ikayaki.util.LoggerPrintStream.timestamp().

Here is the call graph for this function:

Override void ikayaki.util.LoggerPrintStream.print int  i  ) 
 

Definition at line 90 of file LoggerPrintStream.java.

References ikayaki.util.LoggerPrintStream.screen, and ikayaki.util.LoggerPrintStream.timestamp().

Here is the call graph for this function:

Override void ikayaki.util.LoggerPrintStream.print char  c  ) 
 

Definition at line 82 of file LoggerPrintStream.java.

References ikayaki.util.LoggerPrintStream.screen, and ikayaki.util.LoggerPrintStream.timestamp().

Here is the call graph for this function:

Override void ikayaki.util.LoggerPrintStream.print boolean  b  ) 
 

Definition at line 74 of file LoggerPrintStream.java.

References ikayaki.util.LoggerPrintStream.screen, and ikayaki.util.LoggerPrintStream.timestamp().

Here is the call graph for this function:

Override void ikayaki.util.LoggerPrintStream.println Object  x  ) 
 

Definition at line 194 of file LoggerPrintStream.java.

Override void ikayaki.util.LoggerPrintStream.println String  x  ) 
 

Definition at line 189 of file LoggerPrintStream.java.

Override void ikayaki.util.LoggerPrintStream.println char  x[]  ) 
 

Definition at line 184 of file LoggerPrintStream.java.

Override void ikayaki.util.LoggerPrintStream.println double  x  ) 
 

Definition at line 179 of file LoggerPrintStream.java.

Override void ikayaki.util.LoggerPrintStream.println float  x  ) 
 

Definition at line 174 of file LoggerPrintStream.java.

Override void ikayaki.util.LoggerPrintStream.println long  x  ) 
 

Definition at line 169 of file LoggerPrintStream.java.

Override void ikayaki.util.LoggerPrintStream.println int  x  ) 
 

Definition at line 164 of file LoggerPrintStream.java.

Override void ikayaki.util.LoggerPrintStream.println char  x  ) 
 

Definition at line 159 of file LoggerPrintStream.java.

Override void ikayaki.util.LoggerPrintStream.println boolean  x  ) 
 

Definition at line 154 of file LoggerPrintStream.java.

Override void ikayaki.util.LoggerPrintStream.println  ) 
 

Definition at line 146 of file LoggerPrintStream.java.

References ikayaki.util.LoggerPrintStream.lineStart, and ikayaki.util.LoggerPrintStream.screen.

void ikayaki.util.LoggerPrintStream.timestamp  )  [private]
 

Definition at line 63 of file LoggerPrintStream.java.

References ikayaki.util.LoggerPrintStream.dateFormat, ikayaki.util.LoggerPrintStream.lineStart, ikayaki.util.LoggerPrintStream.screen, and ikayaki.util.LoggerPrintStream.timestamp().

Referenced by ikayaki.util.LoggerPrintStream.print(), and ikayaki.util.LoggerPrintStream.timestamp().

Here is the call graph for this function:


Member Data Documentation

DateFormat ikayaki.util.LoggerPrintStream.dateFormat = new SimpleDateFormat("HH:mm:ss.SSS") [private]
 

Definition at line 17 of file LoggerPrintStream.java.

Referenced by ikayaki.util.LoggerPrintStream.timestamp().

boolean ikayaki.util.LoggerPrintStream.lineStart = true [private]
 

Definition at line 19 of file LoggerPrintStream.java.

Referenced by ikayaki.util.LoggerPrintStream.println(), and ikayaki.util.LoggerPrintStream.timestamp().

PrintStream ikayaki.util.LoggerPrintStream.screen [private]
 

Definition at line 21 of file LoggerPrintStream.java.

Referenced by ikayaki.util.LoggerPrintStream.print(), ikayaki.util.LoggerPrintStream.println(), and ikayaki.util.LoggerPrintStream.timestamp().


The documentation for this class was generated from the following file:
Generated on Fri May 6 16:01:36 2005 for Squid by  doxygen 1.4.1