Part of twisted.python.log View Source View In Hierarchy
| Method | __init__ | Undocumented | 
| Method | addObserver | Add a new observer. | 
| Method | removeObserver | Remove an observer. | 
| Method | msg | Log a new message. | 
| Method | showwarning | Twisted-enabled wrapper around warnings.showwarning. | 
| Method | _err | Log a failure. | 
| Parameters | other | A callable object that will be called with each new log message (a dict). (type: Provider of ILogObserver) | 
The message should be a native string, i.e. bytes on Python 2 and Unicode on Python 3. For compatibility with both use the native string syntax, for example:
>>> log.msg('Hello, world.')
You MUST avoid passing in Unicode on Python 2, and the form:
>>> log.msg('Hello ', 'world.')
This form only works (sometimes) by accident.
Similar in functionality to the global {err} function, but the failure gets published only to observers attached to this publisher.
| Parameters | failure | The failure to log. (type: Failure.) | 
| why | The source of this failure.  This will be logged along with the failureand should describe the context in which the failure 
occurred. (type:str) | 
warnings.showwarning.
If file is None, the default behaviour is to 
emit the warning to the log system, otherwise the original warnings.showwarning
Python function is called.