File rotation limitations

Aperta
#90 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
go
Ambito
backend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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 !

Lingua principale
Go
Stelle
881
Fork
64
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di phuslu/log

Tutte le issue di phuslu/log

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.