Vous devez avoir un compte Developpez.com et être connecté pour pouvoir participer aux discussions.

Mot de passe
Mot de passe oublié ?
Créer un compte

Vous n'avez pas encore de compte Developpez.com ? L'inscription est gratuite et ne vous prendra que quelques instants !

Je m'inscris !



Choisissez la catégorie, puis la rubrique : StreamHandler StreamHandler

The StreamHandler class, located in the core logging package, 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.

See About this document... for information on suggesting changes.
Contacter le responsable de la rubrique Python

Partenaire : Hébergement Web