-
Notifications
You must be signed in to change notification settings - Fork 195
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
[ENHANCEMENTS] Logrotation / Compression #411
Comments
@Morethanevil Wow your homelab is really handling some big traffics. |
That would be cool. An option to delete logs after a month or x days would be cool too. My main server handles a lot of traffic because it federates with others. Mastodon, Sharkey, Lemmy, Matrix etc... This is normal for me 😄 Most logs by nginx or apache are compressed via tar.gz, maybe Zoraxy could use this too. The newest way in Linux are binary logs (journalctl) Just a few thoughts |
Related to this, it would also be good to add an option that automatically cleans the logs every so often. |
@Morethanevil In the meantime, you could setup a custom logrotate rule to handle this. Other reverse proxies/web servers also use logrotate to do that kind of stuff. Since Zoraxy does not install into default locations and everything is handled in one main directory, writing a logrotate rules and shipping them with Zoraxy is extremely difficult. I would have made a pull request already, but the fact that Zoraxy stores logs in it's own directory and there is (as far as I know) no way to change it, every setup is too custom. |
@flymia The Zoraxy logger module do have a parameter for setting the output log location, but I didn't expose it as I didn't thought of this will be necessary. If exposing such interface will make your change / PR easier, please feel free to let me know (with details on what changes can benefit your implementation the most). For easy changes like this, I probably can implement and ship it in the next release :) |
@tobychui Basically what's missing is an option to set the various paths (not only log). So it would be a fantastic if we could have an option to setup the paths how we want them to be. This is my zoraxy folder today. I installed it in
It would be great to set it up in the way, that I can put the directories into the FHS ones, if running natively on the machine (and not in a docker container).
That way I could also make another pull request to setup SELinux policies and build an RPM package that users can use to install it faster and easier natively on their Red Hat based machines. Plus, I can put the systemd service file in the RPM, so that this is also done automatically. Since zoraxy is already running as |
Oh, and I forgot to mention: We also would need to change the location of the database file and sys.uuid file. IMO, the FHS compliant folder for that would be |
This enhancement shall save storage space. I took a look at the logs, and it seems Zoraxy does not compress them, they get bigger over time. No rotation, just archiving. On my homeserver they are 300MB, but on my main server the log folder it was over 15GB :)
Maybe Zoraxy could compress them with zip or tar. An option in the settings to delete them after X days would be an idea too.
The text was updated successfully, but these errors were encountered: