File rotation limitations

未关闭
#90 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
go
领域
backend

调研方向

Start by locating the file rotation and Cleaner implementation, then trace how Rotate selects files and handles platform-specific ownership. The issue proposes configurable filename filtering and file enumeration, plus platform-specific rotation behavior, but does not identify source files or tests. Done means supporting the requested compression formats and Windows behavior; the scope needs maintainer clarification.

由索引模型根据 Issue 内容生成。

描述

Hello phuslu,

You have added a very nice set of features in the library; there are a few limitations related to file rotation that give me currently some trouble:

  1. the rotation logic assumes that only gzip is used.
    However, since you exposed an important part of the logic in the Cleaner attribute, you should expose also the filtering of the files so that different compression formats can be used.
    I could, for example, compress as ZSTD, or 7Z, or LZ4 and I would need the corresponding extensions to be evaluated by the Rotate method.

  2. the rotation logic assumes that the code will be executed on Linux - and it has some specific logic (for example retrieving the user and group IDs).
    But the same is needed in Windows context, and there should be a Windows specific logic as well.

Perhaps the best would be to declare a default rotation handler per platform and also expose some variables in the called method:

  • the filter to be used for the files names
  • the enumeration of the files in the log folder

I hope my explanations did not create confusion.

Do you think it is complicated to implement ?

Thank you in advance for your feedback !

主要语言
Go
星标
881
派生
64
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

phuslu/log 的其他 Issue

查看 phuslu/log 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。