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

日志配置 max_files 会造成日志丢失 #1139

Open
1421393078 opened this issue Aug 25, 2023 · 0 comments
Open

日志配置 max_files 会造成日志丢失 #1139

1421393078 opened this issue Aug 25, 2023 · 0 comments

Comments

@1421393078
Copy link

按照手册的配置为例子:
return [
'default' => 'file',
'channels' => [
'file' => [
'type' => 'file',
'max_files' => 30,
'file_size' => 1024102410,
],
],
];

如果日志文件已经有 30 个了, 在当天的日志文件超过 10M 的情况下, 会生成出一个 "1692933919-20230825.log" 的文件。

因为 "1692933919-20230825.log" 是第 31 个文件, 所以会被删除,即超过 file_size 的日志数据就会丢失。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant