Skip to content
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

关于运行日志的自动清理 #22

Closed
Lynn-Becky opened this issue Dec 29, 2023 · 2 comments
Closed

关于运行日志的自动清理 #22

Lynn-Becky opened this issue Dec 29, 2023 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@Lynn-Becky
Copy link

该项目已在开发板运行许久,但由于开发板上的硬盘较小,导致长时间运行后可用储存变小,需要重新部署容器缓解
目前日志大小为2.7g
image
能否开发自动日志清理,或者借助第三方脚本、平台来实现自动清理脚本,感谢!

@dextercai
Copy link
Owner

dextercai commented Dec 29, 2023

本项目正在开发的2.0版本加入了日志轮转机制,可以解决小设备上的日志文件占用问题。

但我从图片猜测你在用docker进行部署,可能与上述该特性无关,图片中的日志应该是docker将stderr/stdout记录下的日志。

可以在docker启动时增加该参数:--log-opt max-size=10m,帮助限制日志大小为10m。
docker该特性文档参考可见: https://docs.docker.com/config/containers/logging/local/

如果还有进一步问题,欢迎继续回复。
对2.0版本有功能请求,请在 #21 回复。

@dextercai dextercai added the help wanted Extra attention is needed label Dec 29, 2023
@Lynn-Becky
Copy link
Author

了解,目前已经在启动时添加了该参数,感谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants