org.eclipse.birt.data.oda.util.logging
Class StreamHandler

java.lang.Object
  extended byorg.eclipse.birt.data.oda.util.logging.Handler
      extended byorg.eclipse.birt.data.oda.util.logging.StreamHandler
Direct Known Subclasses:
FileHandler

Deprecated. As of BIRT 2.0, replaced by org.eclipse.datatools.connectivity.oda.util.logging.StreamHandler .
The BIRT ODA run-time framework has been migrated to the Eclipse Data Tools Platform (DTP) project.

public class StreamHandler
extends Handler

StreamHandler is a stream based logging Handler.


Constructor Summary
StreamHandler()
          Deprecated. Creates a StreamHandler with no output stream.
StreamHandler(java.io.OutputStream output, LogFormatter formatter)
          Deprecated. Creates a StreamHandler with the specified output stream and LogFormatter.
 
Method Summary
 void close()
          Deprecated. Closes the current output stream.
protected  void finalize()
          Deprecated. Cleans up this StreamHandler by calling the close method.
 void flush()
          Deprecated. Flushes buffered message to the output stream.
 boolean isLoggable(LogRecord record)
          Deprecated. Checks if this StreamHandler has an associated OutputStream, whether the LogRecord has the adequate log level, and whether it satisfies the associated Filter.
 void publish(LogRecord record)
          Deprecated. Format and publish the specified LogRecord.
 void setFormatter(LogFormatter formatter)
          Deprecated. Sets the LogFormatter for this StreamHandler.
protected  void setOutputStream(java.io.OutputStream outStream)
          Deprecated. Sets the output stream.
 
Methods inherited from class org.eclipse.birt.data.oda.util.logging.Handler
getFilter, getFormatter, getLevel, getLoggingErrorHandler, reportError, setFilter, setLevel, setLoggingErrorHandler
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamHandler

public StreamHandler()
Deprecated. 
Creates a StreamHandler with no output stream.


StreamHandler

public StreamHandler(java.io.OutputStream output,
                     LogFormatter formatter)
Deprecated. 
Creates a StreamHandler with the specified output stream and LogFormatter.

Parameters:
output - the output stream.
formatter - the log formatter.
Method Detail

close

public void close()
Deprecated. 
Closes the current output stream.

Specified by:
close in class Handler

finalize

protected void finalize()
Deprecated. 
Cleans up this StreamHandler by calling the close method.


flush

public void flush()
Deprecated. 
Flushes buffered message to the output stream.

Specified by:
flush in class Handler

publish

public void publish(LogRecord record)
Deprecated. 
Format and publish the specified LogRecord. This first checks that there is an associated OutputStream and the specified LogRecord has the required log level. This also checks the LogRecord with the associated Filter to see if the record should be published. Then this uses its LogFormatter to format the record and publishes the result to the OutputStream.

Specified by:
publish in class Handler
Parameters:
record - the LogRecord to format and publish.

isLoggable

public boolean isLoggable(LogRecord record)
Deprecated. 
Checks if this StreamHandler has an associated OutputStream, whether the LogRecord has the adequate log level, and whether it satisfies the associated Filter.

Overrides:
isLoggable in class Handler
Parameters:
record - the LogRecord to check.
Returns:
true if the LogRecord should be logged.

setFormatter

public void setFormatter(LogFormatter formatter)
Deprecated. 
Sets the LogFormatter for this StreamHandler. If the formatter is null, then default SimpleFormatter will be used.

Overrides:
setFormatter in class Handler
Parameters:
formatter - the formatter to set.

setOutputStream

protected void setOutputStream(java.io.OutputStream outStream)
Deprecated. 
Sets the output stream.

Parameters:
outStream - the output stream.


Copyright © 2005 Actuate Corp. All rights reserved.