📖 介绍
将 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 |
否 | ./logs |
日志文件保存路径,默认保存在当前工作目录下的 logs 文件夹中 |
LOGPILE_LEVEL |
否 | ERROR |
日志保存等级,可以为列表或者字符串。如果是字符串,那么保存当前等级及以上所有等级的日志,否则只保存列表中的等级 |
LOGPILE_RETENTION |
否 | 14 |
日志文件保留时长,默认保留 14 天,自动清理过期日志 |
Metadata
Release files for nonebot-plugin-logpile 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nonebot_plugin_logpile-0.2.2.tar.gz | 3.5 kB | Without provenance | Details for nonebot_plugin_logpile-0.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nonebot_plugin_logpile-0.2.2-py3-none-any.whl | Python 3 | none | any | Details for nonebot_plugin_logpile-0.2.2-py3-none-any.whl |
Total release size: 8.1 kB
Release files / nonebot_plugin_logpile-0.2.2.tar.gz
| Download URL | nonebot_plugin_logpile-0.2.2.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a63c7fa9cc97e7c68a2940cdc61602d5695dcb8abd973c0e1cdc5769dbdbbc67
|
|
BLAKE2b-256 checksum How to use checksums |
9fac17a2f1beb1f6ca1305f536697e2829ab6787cbb4bd4f33f51314b2f1f91e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Release files / nonebot_plugin_logpile-0.2.2-py3-none-any.whl
| Download URL | nonebot_plugin_logpile-0.2.2-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
02808f915da48d030fe304b268f71fd85f89b5ccca7ae812b09d7cec83604f26
|
|
BLAKE2b-256 checksum How to use checksums |
b1d2a7c2adb45fa7da38791a53b48d930a670420748a19828982b1f817977775
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Security for nonebot-plugin-logpile 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.