def __init__(
self,
facility: Optional[int]=syslog.LOG_USER,
host: Optional[str]='localhost',
port: Optional[int]=514,
encoding: Optional[str]='utf8',
name: Optional[str]=None,
level: Optional[LogLevel]=None
):
"""Instantiates a new ``SyslogHandler``
:param facility: the syslog facility
:param host: the hostname of the syslog server
:param port: the port of the syslog server
:param encoding: the message encoding
:param name: the name of the handler
:param level: the minimum verbosity level to write log entries
"""
self.facility = facility
super().__init__(
name=name, level=level, host=host, port=port, family=socket.AF_INET,
type=socket.SOCK_DGRAM, encoding=encoding)
评论列表
文章目录