output.py 文件源码

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

项目:daiquiri 作者: jd 项目源码 文件源码
def __init__(self, filename=None, directory=None, suffix=".log",
                 program_name=None, formatter=formatter.TEXT_FORMATTER,
                 level=None):
        """Log file output.

        :param filename: The log file path to write to.
        If directory is also specified, both will be combined.
        :param directory: The log directory to write to.
        If no filename is specified, the program name and suffix will be used
        to contruct the full path relative to the directory.
        :param suffix: The log file name suffix.
        This will be only used if no filename has been provided.
        :param program_name: Program name. Autodetected by default.
        """
        logpath = _get_log_file_path(filename, directory,
                                     program_name, suffix)
        handler = logging.handlers.WatchedFileHandler(logpath)
        super(File, self).__init__(handler, formatter, level)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号