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

Enhancement: zstd support for rotated logs #5843

Open
Forza-tng opened this issue Sep 30, 2023 · 3 comments
Open

Enhancement: zstd support for rotated logs #5843

Forza-tng opened this issue Sep 30, 2023 · 3 comments
Labels
upstream ⬆️ Relates to some dependency of this project

Comments

@Forza-tng
Copy link
Contributor

Forza-tng commented Sep 30, 2023

Until #5316 is solved, I'd like support for zstd compressed logfiles. Especially with --long and -T options, zstd is quite a lot more efficient than plain zlib/gzip.

Example using zstd --long -15

-rw------- 1 caddy caddy 100M Sep 20 20:31 wiki.tnonline.net_443-2023-09-20T18-31-05.411.log
-rw------- 1 caddy caddy 7,8M Sep 20 20:31 wiki.tnonline.net_443-2023-09-20T18-31-05.411.log.gz
-rw------- 1 caddy caddy 4,8M Sep 20 20:31 wiki.tnonline.net_443-2023-09-20T18-31-05.411.log.zst
@francislavoie
Copy link
Member

Log rotation is handled by the library we use, lumberjack. That library has unfortunately fallen out of maintenance (see issues/discussion board on its repo for details). We don't really have time to fork and take on maintaining it on top of maintaining Caddy, so we need the community's help for fixes/features relevant to Caddy.

@francislavoie francislavoie added the upstream ⬆️ Relates to some dependency of this project label Sep 30, 2023
@Forza-tng
Copy link
Contributor Author

Forza-tng commented Sep 30, 2023

Oh I see. Then it is better to implement support for external log rotate tools as suggested in #5316 and avoid using lumberjack.

Edit: is it this lumberjack package? It seems to have at least some activity. There's also a PR for recreating log files that were removed by external tools. https://github.com/natefinch/lumberjack

@mholt
Copy link
Member

mholt commented Sep 30, 2023

Edit: is it this lumberjack package? It seems to have at least some activity. There's also a PR for recreating log files that were removed by external tools. https://github.com/natefinch/lumberjack

Lumberjack is still maintained from time-to-time, but it's mostly development of v2. Since it's a big change, we can't really switch to it for something like this easily until it's done/ready for use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream ⬆️ Relates to some dependency of this project
Projects
None yet
Development

No branches or pull requests

3 participants