Website hosting service by Active-Venture.com
  

 Back to Index

6.28.2.1 StreamHandler

The StreamHandler class sends logging output to streams such as sys.stdout, sys.stderr or any file-like object (or, more precisely, any object which supports write() and flush() methods).

 
class StreamHandler( [strm])
Returns a new instance of the StreamHandler class. If strm is specified, the instance will use it for logging output; otherwise, sys.stderr will be used.

 

 
emit( record)
If a formatter is specified, it is used to format the record. The record is then written to the stream with a trailing newline. If exception information is present, it is formatted using traceback.print_exception() and appended to the stream.

 

 
flush( )
Flushes the stream by calling its flush() method. Note that the close() method is inherited from Handler and so does nothing, so an explicit flush() call may be needed at times.
 

  

 

© 2002-2004 Active-Venture.com Webhosting Service

 

Disclaimer: This documentation is provided only for the benefits of our hosting customers.
For authoritative source of the documentation, please refer to http://python.org/doc/

 

Domain registration : Buy domain name or register domain name from $5.95/year only

 

Cheap domain registration : Register domain name or buy domain name, including free domain hosting services

 
  Active-Domain.com offers cheap domain registration, domain name transfer and domain search services