Skip to main content

NoneBot2 local log files

Project description

NoneBotPluginLogo

NoneBotPluginText

nonebot-plugin-logpile

✨ 本地日志保存 ✨

license pypi python

📖 介绍

将 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天,自动清理过期日志

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nonebot-plugin-logpile-0.2.1.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

nonebot_plugin_logpile-0.2.1-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file nonebot-plugin-logpile-0.2.1.tar.gz.

File metadata

File hashes

Hashes for nonebot-plugin-logpile-0.2.1.tar.gz
Algorithm Hash digest
SHA256 f81069ba5045ba76d5184f101a6b49b94388ff2921cc70de937506bfc1c3188b
MD5 5b4f1fe02ff1aac21d30592eae81ed07
BLAKE2b-256 829331c8327addfc55ea6fa49d5ef333043ecf481ad2c98161db50c95a7d54fd

See more details on using hashes here.

File details

Details for the file nonebot_plugin_logpile-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_logpile-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1f6c169265b4fb38eb1098303b23d6e7986dc507ab9919f1dd4e0784ffca0ae0
MD5 77d4584a5e6b36e3f326f87170a28bec
BLAKE2b-256 1db9fb8b1f3cb261484dcdef6785b61351ad9e6f03aa29fee549d9bc28265611

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page