Logging and metrics infrastructure.
|Actually, this interface is just a synonym for the dictionary interface, but it serves as a key for the default information in a log.
|An observer which can do something with log events.
|Utility method which wraps a function in a try:/except:, logs a failure if one occurs, and uses the system's logPrefix.
|Write a failure to the log.
|This represents a class which may 'own' a log. Used by subclassing.
|Class for singleton log message publishing.
|Add a log observer to the global publisher.
|Remove a log observer from the global publisher.
|Publish a message to the global log publisher.
|Publish a Python warning through the global log publisher.
|Extract text from an event dict passed to a log observer. If it cannot handle the dict, it returns None.
|Log observer that writes to a file-like object.
|Output twisted messages to Python standard library
|Class that pretends to be stdout/err, and turns writes into log messages.
|Initialize logging to a specified file.
|Initialize logging to a specified observer. If setStdout is true (defaults to yes), also redirect sys.stdout and sys.stderr to the specified file.
|A file-like object that discards everything.
|Discard messages logged via the global
|A decorator that returns its argument rather than the thing it is decorating.
|Try to format a string, swallowing all errors to always return a string.
|Mix-in for global log observers that can start and stop.
Utility method which wraps a function in a try:/except:, logs a failure if one occurs, and uses the system's logPrefix.
Write a failure to the log.
_why parameters use an
underscore prefix to lessen the chance of colliding with a keyword argument
the application wishes to pass. It is intended that they be supplied with
arguments passed positionally, not by keyword.
|The failure to log. If
None a new
Failure will be
created from the current exception state. If
_stuff is an
Exception instance it will be wrapped in a
|The source of this failure. This will be logged along with
_stuff and should describe the context in which the failure
A decorator that returns its argument rather than the thing it is decorating.
This allows the documentation generator to see an alias for a method or constant as an object with a docstring and thereby document it and allow references to it statically.
|An object to create an alias for. (type:
|a 1-argument callable that returns
Publish a Python warning through the global log publisher.
Try to format a string, swallowing all errors to always return a string.
|string formatting arguments for
|A native string, formatted from
|For backward-compatibility reasons, this function ensures that it returns a
native string, meaning
bytes in Python 2 and
unicode in Python 3.
Extract text from an event dict passed to a log observer. If it cannot handle the dict, it returns None.
The possible keys of eventDict are:
message: by default, it holds the final text. It's
required, but can be empty if either
format is provided (the first having the priority).
isError: boolean indicating the nature of the event.
instance, required if the event is an error.
why: if defined, used as header of the traceback in case
format: string format used in place of
message to customize the event. It uses all keys present
eventDict to format the text.
Other keys will be used when applying the
Initialize logging to a specified file.
if a new observer is added, None otherwise.
Initialize logging to a specified observer. If setStdout is true (defaults to yes), also redirect sys.stdout and sys.stderr to the specified file.
Discard messages logged via the global