(几乎)开箱即用日志记录
frustum的Python项目详细描述
(几乎)开箱即用的日志记录。截头台是标准的 库日志记录,所以您不必再编写相同的样板文件。
安装:
pip install frustum
用法:
from frustum import Frustum # Initialize with logger name and level frustum = Frustum('logger_name', 'debug') # Register all the events that you want within frustum frustum.register_event('setup', 'info', 'Frustum has been setup in {}') # Start the logger frustum.start_logger() # Now you can use the registered events in this way frustum.log('setup', 'readme') # The previous call would output: # INFO:app:Frustum has been setup in readme # into your stdout (as per standard logging configuration)