__init__.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目: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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号