Skip to content

Commit aa5de4d

Browse files
authored
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.
1 parent 7006d82 commit aa5de4d

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

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

+4-2
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@ menu:
1515

1616
# Logging Configuration
1717

18-
The logging framework has been revamped in Gitea 1.9.0.
19-
2018
**Table of Contents**
2119

2220
{{< toc >}}
2321

22+
## Collecting Logs for Help
23+
24+
To collect logs for help and issue report, see [Support Options]({{< relref "doc/help/seek-help.en-us.md" >}}).
25+
2426
## Log Groups
2527

2628
The fundamental thing to be aware of in Gitea is that there are several

docs/content/doc/help/faq.en-us.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,9 @@ Gitea requires the system or browser to have one of the supported Emoji fonts in
392392

393393
Stdout on systemd goes to the journal by default. Try using `journalctl`, `journalctl -u gitea`, or `journalctl <path-to-gitea-binary>`.
394394

395-
Similarly stdout on docker can be viewed using `docker logs <container>`
395+
Similarly, stdout on docker can be viewed using `docker logs <container>`.
396+
397+
To collect logs for help and issue report, see [Support Options]({{< relref "doc/help/seek-help.en-us.md" >}}).
396398

397399
## Initial logging
398400

@@ -413,7 +415,7 @@ unchanged in the database schema. This may lead to warning such as:
413415
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
414416
```
415417

416-
These can safely be ignored but you may able to stop these warnings by getting Gitea to recreate these tables using:
418+
These can safely be ignored, but you are able to stop these warnings by getting Gitea to recreate these tables using:
417419

418420
```
419421
gitea doctor recreate-table user

docs/content/doc/help/seek-help.en-us.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,14 @@ menu:
2222

2323
1. Your `app.ini` (with any sensitive data scrubbed as necessary).
2424
2. The Gitea logs, and any other appropriate log files for the situation.
25-
- The logs are likely to be outputted to console. If you need to collect logs from files,
25+
- When using systemd, use `journalctl --lines 1000 --unit gitea` to collect logs.
26+
- When using docker, use `docker logs --tail 1000 <gitea-container>` to collect logs.
27+
- By default, the logs are outputted to console. If you need to collect logs from files,
2628
you could copy the following config into your `app.ini` (remove all other `[log]` sections),
2729
then you can find the `*.log` files in Gitea's log directory (default: `%(GITEA_WORK_DIR)/log`).
2830

2931
```ini
30-
; To show all SQL logs, you can also set LOG_SQL=true in the [database] section
32+
; To show all SQL logs, you can also set LOG_SQL=true in the [database] section
3133
[log]
3234
LEVEL=debug
3335
MODE=console,file

0 commit comments

Comments
 (0)