NoneBot2 local log files
Project description
📖 介绍
将 nonebot 的日志记录保存到本地文件
💿 安装
使用 nb-cli 安装
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装nb plugin install nonebot-plugin-logpile
使用包管理器安装
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令pip
pip install nonebot-plugin-logpile
pdm
pdm add nonebot-plugin-logpile
poetry
poetry add nonebot-plugin-logpile
conda
conda install nonebot-plugin-logpile
打开 nonebot2 项目根目录下的 pyproject.toml
文件, 在 [tool.nonebot]
部分追加写入
plugins = ["nonebot_plugin_logpile"]
⚙️ 配置
在 nonebot2 项目的.env
文件中添加下表中的必填配置
配置项 | 必填 | 默认值 | 说明 |
---|---|---|---|
logpile_path | 否 | cwd/log |
日志文件保存路径,默认保存在当前工作目录下的 log 文件夹中 |
logpile_level | 否 | ERROR | 日志保存等级,可以为列表或者字符串。如果是字符串,那么保存当前等级及以下所有等级的日志,否则只保存列表中的等级 |
logpile_retention | 否 | 14 | 日志文件保留时长,默认保留14天,自动清理过期日志 |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for nonebot-plugin-logpile-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | dfbe5e09ef05405caced3e976de1335c303da9df208da1b334cb4852f15fb262 |
|
MD5 | e1d9a73e6f7d7871e2a5f5f7e47b18bf |
|
BLAKE2b-256 | 78844d837fa49b1e20ca8302e4b5931debb0236d87e21a35550486f53af31b05 |
Close
Hashes for nonebot_plugin_logpile-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a173f8cf14424ccd178f6d182a0bc1aca7458eee43a6dffc05fe1c7181dd67d |
|
MD5 | 00a500d73eb30ca81a5ef7b02e075be0 |
|
BLAKE2b-256 | 0f377f3b0734ad9dd0ea4a680ab8b2e1eafc7b63c1dbed5a40ede4baae785532 |