Currently, log rotation in gitea is done implicitly in the file logger when log files exceeds a given age or size. This can cause race condition on "serv" commands where multiple processes write to the same logfile.
Example:
2 serv commands are started, read the logfile size which is close to maximum size and write a log line. Now both processes will rotate the logs.
We should either
a) rework log rotation so that is handled by the long-running server process
b) remove log rotation entirely from gitea and use "logrotate" on the docker images.
or
c) remove file logging entirely from gitea and use the sysem's logging infrastructure (syslog, systemd-journal or such)
I think we could use another matured log library to maintain a this one.
I'm going to close this as we no longer write to the serv.log.
Most helpful comment
I think we could use another matured log library to maintain a this one.