Skip to content

add error log to file #3431

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Aug 20, 2025
Merged

Conversation

xiaolei373
Copy link
Collaborator

@xiaolei373 xiaolei373 commented Aug 15, 2025

1、实现ERROR日志分流到相应的的文件中,便于排查问题
2、ERROR日志延迟打印,只有真正写入ERROR日志时才会创建文件,避免创建过多空日志文件
3、在兼容原有日志使用方式的基础上,新增了通过日志Json配置的方式定义日志处理方式,全局共用相同的logger
4、新日志使用方式会存储最新一小时全量日志和ERROR日志
5、新日志使用方式增加了按天和小时归档的能力

Copy link

paddle-bot bot commented Aug 15, 2025

Thanks for your contribution!

@paddle-bot paddle-bot bot added the contributor External developers label Aug 15, 2025
@xiaolei373 xiaolei373 requested review from ltd0924 and jiangjiajun and removed request for ltd0924 August 15, 2025 09:21
@xiaolei373 xiaolei373 force-pushed the new_log_config branch 4 times, most recently from 106cd03 to f9c760c Compare August 19, 2025 03:28
"""
自定义日志格式化器模块
该模块定义了 ColoredFormatter 类,用于在控制台输出带颜色的日志信息,
便于开发者在终端中快速识别不同级别的日志。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

增加开源协议

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好滴

@Jiang-Jia-Jun Jiang-Jia-Jun merged commit 5d13148 into PaddlePaddle:develop Aug 20, 2025
13 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants