mirror of
https://github.com/yusing/godoxy.git
synced 2026-01-14 15:43:37 +01:00
Log rotate (access_logs) #56
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ragchuck on GitHub (Apr 15, 2025).
My access.log is already quite large, are there any plans to implement log rotate solution?
https://caddyserver.com/docs/caddyfile/directives/log#file
https://github.com/natefinch/lumberjack
@yusing commented on GitHub (Apr 15, 2025):
Planning to do so, I have these skeleton code quite long time ago: https://github.com/yusing/godoxy/blob/main/internal/net/gphttp/accesslog/rotate.go.
https://github.com/yusing/godoxy/blob/main/internal/net/gphttp/accesslog/retention.go
I'll implement it asap.
@yusing commented on GitHub (Apr 18, 2025):
Hey, I've implemented log rotation (92a11648b0572f91a39febb4d9dfa1f9693f392c). If you're interested please try it on
nightlyimage.@ragchuck commented on GitHub (Apr 22, 2025):
@yusing maybe you could give me a hint how to configure this?
I updated my tag to
nightlyand added this to config.yml:But the log doesn't seem to be rotated...
@yusing commented on GitHub (Apr 22, 2025):
The nightly is currently on an OIDC fix patch. Sorry but you'll have to wait before next version releases.
The syntax will be like this:
retention: <value>Available values:
{N} [days|weeks|months]last {N}: last N lines{N} [KB|MB|GB|Kb|Gb|Mb]@ragchuck commented on GitHub (Apr 22, 2025):
got it! thanks!
@yusing commented on GitHub (Apr 25, 2025):
v0.11.0 is out :)