Gentoo’s default configuration for the Minetest server is to send log data to /var/log/minetest/minetest-server.log. Everything else I have installed on my server that logs to /var/log has a file in /etc/logrotate.d to keep the logs at a reasonable level. It would be nice if Minetest did too. Reproducible: Always
Sure, that seems reasonable. Are there any configuration options in particular you think would be good to have set? For example, should the logs be rotated on a weekly basis, how many rotations, etc?
I don’t run a big server, so I don’t know what people doing so would want. For me, either of daily keeping a month or weekly keeping a year would seem fairly sane. I’m not sure how you need to interact with the server process, whether it has a reopen-log-file signal or anything like that, or whether it handles truncation sanely, or whatever.
Oh, weekly keeping five (as in your PR) is fine for me too.
(In reply to Christopher Head from comment #2) > I’m not sure how you need to interact with the server process, > whether it has a reopen-log-file signal or anything like that, or whether it > handles truncation sanely, or whatever. That's something I hadn't considered; I don't think a currently running minetest server will automatically create a new log file when the original disappears. I wonder what we can do then in order to support logrotate.
(In reply to William Breathitt Gray from comment #4) > (In reply to Christopher Head from comment #2) > > I’m not sure how you need to interact with the server process, > > whether it has a reopen-log-file signal or anything like that, or whether it > > handles truncation sanely, or whatever. > > That's something I hadn't considered; I don't think a currently running > minetest server will automatically create a new log file when the original > disappears. I wonder what we can do then in order to support logrotate. Luckily there is a "copytruncate" logrotate option so I'll use that: https://jlk.fjfi.cvut.cz/arch/manpages/man/logrotate.8#Files_and_Folders
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ffce436ef2bfa2d7eba140f72b4d9e0c70a8e75 commit 1ffce436ef2bfa2d7eba140f72b4d9e0c70a8e75 Author: William Breathitt Gray <vilhelm.gray@gmail.com> AuthorDate: 2020-05-25 19:26:05 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2020-06-24 14:29:18 +0000 games-action/minetest: Add logrotate configuration file Closes: https://bugs.gentoo.org/725122 Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/15969 Signed-off-by: Joonas Niilola <juippis@gentoo.org> games-action/minetest/files/minetestserver.logrotate | 5 +++++ games-action/minetest/minetest-5.2.0.ebuild | 3 +++ 2 files changed, 8 insertions(+)