Part of udplog.udplog View Source View In Hierarchy
Configurable UDPLog logging handler.
This is a convenience subclass of UDPLogHandler for use in logging
configuration files (see logging.config.fileConfig):
[loggers]
keys = root
[handlers]
keys = udplog
[formatters]
keys =
[logger_root]
level = INFO
handlers = udplog
[handler_udplog]
class = udplog.udplog.ConfigurableUDPLogHandler
level = INFO
args = ({'appname': 'example'},)
| Note | This is a subclass instead of a factory function because logging.config
requires this. | |
| Line # | Kind | Name | Docs |
|---|---|---|---|
| 292 | Method | __init__ | Set up a UDPLogHandler with a UDPLogger. |
Inherited from UDPLogHandler:
| Line # | Kind | Name | Docs |
|---|---|---|---|
| 212 | Method | emit | Emit a record. |
Set up a UDPLogHandler with a UDPLogger.
| Parameters | defaultFields | Mapping of default fields to include in all events. (type: dict.) |
| category | The UDPLog category. (type: bytes.) | |
| host | The UDP host to send to. (type: int.) | |
| port | The UDP port to send to. | |
| includeHostname | If set, the default fields include a 'hostname' field set to
the current hostname. (type: bool.) |