mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Upgrade the document about how to collect logs for systemd and docker (#21101)
Many users (#21099) do not know how to collect logs if they are using systemd. This PR makes the document more clear.
This commit is contained in:
@@ -22,12 +22,14 @@ menu:
|
||||
|
||||
1. Your `app.ini` (with any sensitive data scrubbed as necessary).
|
||||
2. The Gitea logs, and any other appropriate log files for the situation.
|
||||
- The logs are likely to be outputted to console. If you need to collect logs from files,
|
||||
- When using systemd, use `journalctl --lines 1000 --unit gitea` to collect logs.
|
||||
- When using docker, use `docker logs --tail 1000 <gitea-container>` to collect logs.
|
||||
- By default, the logs are outputted to console. If you need to collect logs from files,
|
||||
you could copy the following config into your `app.ini` (remove all other `[log]` sections),
|
||||
then you can find the `*.log` files in Gitea's log directory (default: `%(GITEA_WORK_DIR)/log`).
|
||||
|
||||
```ini
|
||||
; To show all SQL logs, you can also set LOG_SQL=true in the [database] section
|
||||
; To show all SQL logs, you can also set LOG_SQL=true in the [database] section
|
||||
[log]
|
||||
LEVEL=debug
|
||||
MODE=console,file
|
||||
|
Reference in New Issue
Block a user