On Tue, 2021-06-29 at 11:12 -0300, David Bremner wrote:
> https://gitolite.com/gitolite/dev-notes.html#appendix-3-sending-log-lines-to-syslog

Yeah, that's clear,... but then it does go to syslog... plus the
default out-of-the-box installation would still put non-rotated files
into a path that is not really typical for logs :-)


> I guess one could in principle ship different defaults in
> /etc/gitolite3/gitolite.rc, but that is a minor maintainence burden
> merging from upstream.

Wouldn't it be as simple as:
- ship /var/log/gitolite3 with appropriate permissions/owners as part
  of the package
- overwrite /var/lib/gitolite3/.gitolite/logs to be a symlink to the
  former
- add a logrotation snippet as conffile to /etc/logrotate.d/gitolite3

That way you wouldn't need to fiddle around with the sources and all
would still be like upstream... just that it goes of to another
location.
And all users of the gitolite would benefit from it.


I guess the only thing to consider is, that any log-files that already
exist in the (then) old location on upgrade would need to be moved to
/var/log/gitolite3.


> Hmm. I think that would depend too much on a particular local logging
> configuration. It doesn't make sense to me for gitolite to depend on
> e.g. rsyslog.

Why that? logrotate is the standard logrotation tool used in Debian by
many services.
And it should be pretty independent of rsyslog, it just takes rotates
the logfiles in whichever path given.

And if someone configures his gitolite to use syslog instead of files
in, the logrotate snippet would simply do nothing (once all existing
files have been rotated away).
Same if someone configures it to use systemd journald.

Right now at least, we have the situation that nothing seems to rotate
these files and they could in principle fill up the filesystem
eventually.


Cheers,
Chris

Reply via email to