zeromicro / go-zero

A cloud-native Go microservices framework with cli tool for productivity.
https://go-zero.dev
MIT License
29.35k stars 3.96k forks source link

Logs are rotated based on size, and exceeding a certain amount will result in log loss. #4394

Open JellyTony opened 1 month ago

JellyTony commented 1 month ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior, if applicable:

  1. The code is

    MaxSize(1)
    Rotation("size")
    
  2. The error is

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Environments (please complete the following information):

More description 发现 size轮转的备份规则是 RFC3339,当在1s 内写入大量日志切发生轮转行为,就会丢日志,因为命名规则是按秒命名的