Skip to content

Commit 9dd851d

Browse files
zeripathlunny
authored andcommitted
Add information on how to rotate logging from outside container (go-gitea#15852)
Fix go-gitea#15842 Signed-off-by: Andrew Thornton <[email protected]> Co-authored-by: Lunny Xiao <[email protected]>
1 parent 3a8854e commit 9dd851d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/content/doc/advanced/logging-documentation.en-us.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,8 @@ Gitea includes built-in log rotation, which should be enough for most deployment
437437

438438
- Disable built-in log rotation by setting `LOG_ROTATE` to `false` in your `app.ini`.
439439
- Install `logrotate`.
440-
- Configure `logrotate` to match your deployment requirements, see `man 8 logrotate` for configuration syntax details. In the `postrotate/endscript` block send Gitea a `USR1` signal via `kill -USR1` or `kill -10`, or run `gitea manager logging release-and-reopen` (with the appropriate environment). Ensure that your configurations apply to all files emitted by Gitea loggers as described in the above sections.
441-
- Always do `logrotate /etc/logrotate.conf --debug` to test your configurations.
440+
- Configure `logrotate` to match your deployment requirements, see `man 8 logrotate` for configuration syntax details. In the `postrotate/endscript` block send Gitea a `USR1` signal via `kill -USR1` or `kill -10` to the `gitea` process itself, or run `gitea manager logging release-and-reopen` (with the appropriate environment). Ensure that your configurations apply to all files emitted by Gitea loggers as described in the above sections.
441+
- Always do `logrotate /etc/logrotate.conf --debug` to test your configurations.
442+
- If you are using docker and are running from outside of the container you can use `docker exec -u $OS_USER $CONTAINER_NAME sh -c 'gitea manager logging release-and-reopen'` or `docker exec $CONTAINER_NAME sh -c '/bin/s6-svc -1 /etc/s6/gitea/'` or send `USR1` directly to the gitea process itself.
442443

443444
The next `logrotate` jobs will include your configurations, so no restart is needed. You can also immediately reload `logrotate` with `logrotate /etc/logrotate.conf --force`.

0 commit comments

Comments
 (0)