File rotation limitations

Đang mở
#90 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
go
Lĩnh vực
backend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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 !

Ngôn ngữ chính
Go
Star
881
Fork
64
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của phuslu/log

Tất cả issue của phuslu/log

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.