1 Star 1 Fork 3

云金杞/ib

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
logger.py 890 Bytes
一键复制 编辑 原始数据 按行查看 历史
云金杞 提交于 2023-04-03 10:45 +08:00 . copy from ibpy2
#!/usr/bin/env python
# -*- coding: utf-8 -*-
##
# Defines logging formats and logger instance
##
import logging
import os
##
# Default log message formatting string.
format = '%(asctime)s %(levelname)-9.9s %(message)s'
##
# Default log date formatting string.
datefmt = '%d-%b-%y %H:%M:%S'
##
# Default log level. Set IBPY_LOGLEVEL environment variable to
# change this default.
level = int(os.environ.get('IBPY_LOGLEVEL', logging.DEBUG))
def logger(name='ibpy', level=level, format=format,
datefmt=datefmt):
""" Configures and returns a logging instance.
@param name ignored
@param level logging level
@param format format string for log messages
@param datefmt format string for log dates
@return logging instance (the module)
"""
logging.basicConfig(level=level, format=format, datefmt=datefmt)
return logging.getLogger(name)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yunjinqi/ib.git
git@gitee.com:yunjinqi/ib.git
yunjinqi
ib
ib
master

搜索帮助