go-zero
go-zero copied to clipboard
logx doesn't handle the scenario that log files are deleted by accident
trafficstars
程序正常启动,在使用logx写日志时发现,在删除生成的log日志文件后(可能存在误删),就不会再次生成新的日志文件问题。
Yes, this scenario is reasonable. In theory, why would a service running online delete log files? This behavior itself is unreasonable.
This issue is stale because it has been open for 30 days with no activity.
To fix the file deleted problem, we need to create a ticker to check the file existence periodically. I think we don't need to do that. Recommend to handle the log files correctly instead of implementing it in framework.