Skip to main content

A wrapper for the logging module in python.

Project description

rclog

pdm-managed

对python中logging模块的包装

接口

对外提供SetLoggerget_logger

SetLogger

SetLogger 内有from_dict,from_args,from_object多个函数,可用多种方式配置log,有下列配置选项

Args:
    handlers (list): _description_
    formats (list, optional): _description_. Defaults to [ "default", ].
    exist_loggers (bool, optional): _description_. Defaults to True.

Keyword Args:
    "{format_name}_format" (str, optional): _description_. Defaults to "<%(asctime)s>[%(levelname)s]%(name)s:%(message)s".
    "{format_name}_datefmt" (str, optional): _description_. Defaults to "%Y-%m-%d %H:%M:%S".
    "{handler_name}_class" (str, optional): _description_. Defaults to "Console".
    "{handler_name}_formatter" (str, optional): _description_. Defaults to "default".
    "{handler_name}_level" (str, optional): _description_. Defaults to None.
    "{handler_name}_filename" (str, optional): _description_. Defaults to None.
    "{handler_name}_maxBytes" (int, optional): _description_. Defaults to None.
    "{handler_name}_backupCount" (int, optional): _description_. Defaults to None.
    "{handler_name}_encoding" (str, optional): _description_. Defaults to "utf8".

get_logger

get_logger函数可以获取Logger对象,可以设置名字,默认为调用的文件名

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rclog-1.2.0.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

rclog-1.2.0-py3-none-any.whl (4.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page