Python syslog 模块,LOG_DAEMON 实例源码

我们从Python开源项目中,提取了以下5个代码示例,用于说明如何使用syslog.LOG_DAEMON

项目:TOR-Hidden-Service-Verification    作者:arrase    | 项目源码 | 文件源码
def __init__(self):
        syslog.openlog(facility=syslog.LOG_DAEMON)
项目:python-application    作者:AGProjects    | 项目源码 | 文件源码
def __init__(self, name, facility=syslog.LOG_DAEMON):
        logging.Handler.__init__(self)
        syslog.openlog(name, syslog.LOG_PID, facility)
项目:python-application    作者:AGProjects    | 项目源码 | 文件源码
def start_syslog(name='python-app', facility=syslog.LOG_DAEMON, capture_stdout=IfNotInteractive, capture_stderr=IfNotInteractive):
    if syslog is Null:
        raise RuntimeError("syslog is not available on this platform")
    for handler in root_logger.handlers[:]:
        root_logger.removeHandler(handler)
    handler = SyslogHandler(name, facility)
    handler.setFormatter(_default_formatter)
    root_logger.addHandler(handler)
    if capture_stdout:
        sys.stdout = StandardIOLogger(root_logger.info)
    if capture_stderr:
        sys.stderr = StandardIOLogger(root_logger.error)
项目:megadld    作者:arrase    | 项目源码 | 文件源码
def __init__(self):
        syslog.openlog(facility=syslog.LOG_DAEMON)
项目:DevOps    作者:YoLoveLife    | 项目源码 | 文件源码
def log(msg, cap=0):
    global DEBUG_LEVEL
    if DEBUG_LEVEL >= cap:
        syslog.syslog(syslog.LOG_NOTICE|syslog.LOG_DAEMON, msg)