twisted.loggerView Source (View In Hierarchy)
holds state related to logging before logging has begun, and begins logging
when told to do so. Logging "begins" when someone has selected a
set of observers, like, for example, a
that writes to a file on disk, or to standard output.
Applications will not typically need to instantiate this class, except
those which intend to initialize the global logging system themselves,
which may wish to instantiate this for testing. The global instance for
the current process is exposed as
Before logging has begun, a
|Method||beginLoggingTo||Begin logging to the given set of observers. This will:|
|Method||showwarning||Twisted-enabled wrapper around
|Instance Variable||_initialBuffer||A buffer of messages logged before logging began. (type:
|Instance Variable||_publisher||The log publisher passed in to
|Instance Variable||_log||The logger used to log messages about the operation of the
|Instance Variable||_temporaryObserver||If not
|Instance Variable||_stdio||An object with
|Class Variable||_DEFAULT_BUFFER_SIZE||The default size for the initial log events buffer. (type:
Begin logging to the given set of observers. This will:
LogPublisherassociated with this
discardBufferis not set.
LogPublisheras strings to the
errorStreamassociated with this
LogBeginner, and allow them to be logged normally.
warningsmodule associated with this
LogBeginnerto log messages.
|Parameters||observers||The observers to register. (type: iterable of |
|discardBuffer||Whether to discard the buffer and not re-play it to the added observers.
(This argument is provided mainly for compatibility with legacy concerns.) (type: |
|redirectStandardIO||If true, redirect standard output and standard error to the observers. (type: |
|Note||Since a |
Twisted-enabled wrapper around
|Parameters||message||A warning message to emit. (type: |
|category||A warning category to associate with |
|filename||A file name for the source code file issuing the warning.|
|lineno||A line number in the source file where the warning was issued. (type: |
|file||A file to write the warning message to. If |
|line||A line of source code to include with the warning message. If |