日志接口¶
Basic logging setup.
- rayvision_log.core.get_default_log_config()¶
Get the default logging configuration.
- 返回:
The default logging configuration.
- 返回类型:
- rayvision_log.core.init_logger(app_name, log_folder=None, log_name=None)¶
Initialize logging with our default configuration.
An easier interface for artists to use to create loggers in their packages and applications. Any application that uses this will use the default logging configuration.
示例
>>> import logging >>> from rayvision_log import init_logger >>> app_name = "rayvision_api" >>> init_logger(app_name) >>> LOG = logging.getLogger(app_name)
- rayvision_log.core.set_up_logger(app_name, log_config, use_orginal=False, log_folder=None, log_name=None)¶
Set up loggers based on given name and configuration.
示例
>>> app_name = "rayvision_api" >>> log_config = { formatters: { file: { format: '%(asctime)s [%(levelname)s] %(name)s: %(message)s' } }, handlers: { file: { class: concurrent_log_handler.ConcurrentRotatingFileHandler } } }
- 参数:
引用
https://pypi.org/project/ConcurrentLogHandler/
- 返回:
log path