mirror of
https://github.com/KohakuBlueleaf/KohakuHub.git
synced 2026-03-08 23:02:09 -05:00
[PR #1] [MERGED] Logger improvements with loguru #1
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/KohakuBlueleaf/KohakuHub/pull/1
Author: @ntrwansuiBC
Created: 10/24/2025
Status: ✅ Merged
Merged: 10/25/2025
Merged by: @KohakuBlueleaf
Base:
main← Head:main📝 Commits (1)
980c146update: now logger.py based on loguru.📊 Changes
7 files changed (+481 additions, -151 deletions)
View changed files
📝
.gitignore(+1 -0)📝
config-example.toml(+4 -0)📝
pyproject.toml(+1 -0)📝
scripts/generate_docker_compose.py(+3 -0)📝
src/kohakuhub/config.py(+10 -0)📝
src/kohakuhub/logger.py(+139 -151)➕
src/kohakuhub/old_logger.py(+323 -0)📄 Description
Pull Request
What changed?
基于Loguru重写logger
现在如果app.log_format被设置为file
则日志文件会被输出至app.log_dir/kohakuhub.log下
使用InterceptHandler接管其他类库的日志
Why?
Fixes #
Testing
Checklist
Screenshots
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.