nonebot2/docs/api/log.md

43 lines
563 B
Markdown
Raw Normal View History

2020-08-23 09:03:59 +00:00
---
contentSidebar: true
sidebarDepth: 0
---
2020-08-20 07:07:05 +00:00
# NoneBot.log 模块
## 日志
2020-08-26 14:54:58 +00:00
NoneBot 使用 [loguru](https://github.com/Delgan/loguru) 来记录日志信息。
2020-08-20 07:07:05 +00:00
2020-08-26 14:54:58 +00:00
自定义 logger 请参考 [loguru](https://github.com/Delgan/loguru) 文档。
2020-08-20 07:07:05 +00:00
## `logger`
* **说明**
NoneBot 日志记录器对象。
* **默认信息**
* 格式: `[%(asctime)s %(name)s] %(levelname)s: %(message)s`
* 等级: `DEBUG` / `INFO` ,根据 config 配置改变
* 输出: 输出至 stdout
* **用法**
```python
from nonebot.log import logger
```