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.
|
| Parameters | other | A callable object that will be called with each new log message (a
dict).
(type: Provider of ILogObserver
) |
Log a new message.
For example:>>> log.msg('Hello, world.')In particular, you MUST avoid the forms:
>>> log.msg(u'Hello, world.') >>> log.msg('Hello ', 'world.')These forms work (sometimes) by accident and will be disabled entirely in the future.
Twisted-enabled wrapper around warnings.showwarning.
file is None, the default behaviour is to
emit the warning to the log system, otherwise the original
warnings.showwarning Python function is called.