mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-15 18:08:23 -07: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:
parent
7006d8297d
commit
aa5de4dcad
@ -15,12 +15,14 @@ menu:
|
|||||||
|
|
||||||
# Logging Configuration
|
# Logging Configuration
|
||||||
|
|
||||||
The logging framework has been revamped in Gitea 1.9.0.
|
|
||||||
|
|
||||||
**Table of Contents**
|
**Table of Contents**
|
||||||
|
|
||||||
{{< toc >}}
|
{{< toc >}}
|
||||||
|
|
||||||
|
## Collecting Logs for Help
|
||||||
|
|
||||||
|
To collect logs for help and issue report, see [Support Options]({{< relref "doc/help/seek-help.en-us.md" >}}).
|
||||||
|
|
||||||
## Log Groups
|
## Log Groups
|
||||||
|
|
||||||
The fundamental thing to be aware of in Gitea is that there are several
|
The fundamental thing to be aware of in Gitea is that there are several
|
||||||
|
@ -392,7 +392,9 @@ Gitea requires the system or browser to have one of the supported Emoji fonts in
|
|||||||
|
|
||||||
Stdout on systemd goes to the journal by default. Try using `journalctl`, `journalctl -u gitea`, or `journalctl <path-to-gitea-binary>`.
|
Stdout on systemd goes to the journal by default. Try using `journalctl`, `journalctl -u gitea`, or `journalctl <path-to-gitea-binary>`.
|
||||||
|
|
||||||
Similarly stdout on docker can be viewed using `docker logs <container>`
|
Similarly, stdout on docker can be viewed using `docker logs <container>`.
|
||||||
|
|
||||||
|
To collect logs for help and issue report, see [Support Options]({{< relref "doc/help/seek-help.en-us.md" >}}).
|
||||||
|
|
||||||
## Initial logging
|
## Initial logging
|
||||||
|
|
||||||
@ -413,7 +415,7 @@ unchanged in the database schema. This may lead to warning such as:
|
|||||||
2020/08/02 11:32:29 ...rm/session_schema.go:360:Sync2() [W] Table user Column keep_activity_private db default is , struct default is 0
|
2020/08/02 11:32:29 ...rm/session_schema.go:360:Sync2() [W] Table user Column keep_activity_private db default is , struct default is 0
|
||||||
```
|
```
|
||||||
|
|
||||||
These can safely be ignored but you may able to stop these warnings by getting Gitea to recreate these tables using:
|
These can safely be ignored, but you are able to stop these warnings by getting Gitea to recreate these tables using:
|
||||||
|
|
||||||
```
|
```
|
||||||
gitea doctor recreate-table user
|
gitea doctor recreate-table user
|
||||||
|
@ -22,12 +22,14 @@ menu:
|
|||||||
|
|
||||||
1. Your `app.ini` (with any sensitive data scrubbed as necessary).
|
1. Your `app.ini` (with any sensitive data scrubbed as necessary).
|
||||||
2. The Gitea logs, and any other appropriate log files for the situation.
|
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),
|
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`).
|
then you can find the `*.log` files in Gitea's log directory (default: `%(GITEA_WORK_DIR)/log`).
|
||||||
|
|
||||||
```ini
|
```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]
|
[log]
|
||||||
LEVEL=debug
|
LEVEL=debug
|
||||||
MODE=console,file
|
MODE=console,file
|
||||||
|
Loading…
Reference in New Issue
Block a user