From 99dbfcd09e0d59b55d68c526185fc5729f990f39 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Thu, 23 Jun 2022 11:44:33 +0800 Subject: [PATCH 1/5] Improve log document --- docs/content/doc/help/seek-help.en-us.md | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/docs/content/doc/help/seek-help.en-us.md b/docs/content/doc/help/seek-help.en-us.md index 8ffa80f154242..bc313b7b700b3 100644 --- a/docs/content/doc/help/seek-help.en-us.md +++ b/docs/content/doc/help/seek-help.en-us.md @@ -20,10 +20,25 @@ menu: **NOTE:** When asking for support, it may be a good idea to have the following available so that the person helping has all the info they need: -1. Your `app.ini` (with any sensitive data scrubbed as necessary) -2. The `gitea.log` (and any other appropriate log files for the situation) - * e.g. If the error is related to the database, the `xorm.log` might be helpful -3. Any error messages you are seeing +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 may be outputted to console by default. 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 `gitea.log` in Gitea's log directory (default: `%(GITEA_WORK_DIR)/log`). + ``` + ; To show all SQLs, you could also set LOG_SQL=true in [database] section + [log] + LEVEL=debug + MODE=console,file + ROUTER=console,file + XORM=console,file + ENABLE_XORM_LOG=true + [log.file.router] + FILE_NAME=gitea.log + [log.file.xorm] + FILE_NAME=gitea.log + ``` +3. Any error messages you are seeing. 4. When possible, try to replicate the issue on [try.gitea.io](https://try.gitea.io) and include steps so that others can reproduce the issue. * This will greatly improve the chance that the root of the issue can be quickly discovered and resolved. 5. If you meet slow/hanging/deadlock problems, please report the stack trace when the problem occurs: From 9e7ea66994bf44313f76c09cb508b4db27025832 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Thu, 23 Jun 2022 16:15:35 +0800 Subject: [PATCH 2/5] Update docs/content/doc/help/seek-help.en-us.md Co-authored-by: delvh --- docs/content/doc/help/seek-help.en-us.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/content/doc/help/seek-help.en-us.md b/docs/content/doc/help/seek-help.en-us.md index bc313b7b700b3..6b9f9936374c2 100644 --- a/docs/content/doc/help/seek-help.en-us.md +++ b/docs/content/doc/help/seek-help.en-us.md @@ -25,8 +25,8 @@ menu: * The logs may be outputted to console by default. 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 `gitea.log` in Gitea's log directory (default: `%(GITEA_WORK_DIR)/log`). - ``` - ; To show all SQLs, you could also set LOG_SQL=true in [database] section + ```ini + ; To show all SQL logs, you can also set LOG_SQL=true in the [database] section [log] LEVEL=debug MODE=console,file From d652b91b51cfe6e2789029b5c78edad1ab6e316e Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Thu, 23 Jun 2022 16:57:59 +0800 Subject: [PATCH 3/5] Update docs/content/doc/help/seek-help.en-us.md Co-authored-by: Gusted --- docs/content/doc/help/seek-help.en-us.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/doc/help/seek-help.en-us.md b/docs/content/doc/help/seek-help.en-us.md index 6b9f9936374c2..e03a173aeac5c 100644 --- a/docs/content/doc/help/seek-help.en-us.md +++ b/docs/content/doc/help/seek-help.en-us.md @@ -22,7 +22,7 @@ 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 may be outputted to console by default. If you need to collect logs from files, + * The logs are likely to be 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 `gitea.log` in Gitea's log directory (default: `%(GITEA_WORK_DIR)/log`). ```ini From 184bf080b56d0b7cd2fabac4ae29cace7b99842c Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Thu, 23 Jun 2022 23:47:26 +0800 Subject: [PATCH 4/5] Use different log names to avoid conflicts --- docs/content/doc/help/seek-help.en-us.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/content/doc/help/seek-help.en-us.md b/docs/content/doc/help/seek-help.en-us.md index e03a173aeac5c..a82677e805d39 100644 --- a/docs/content/doc/help/seek-help.en-us.md +++ b/docs/content/doc/help/seek-help.en-us.md @@ -24,7 +24,7 @@ menu: 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, you could copy the following config into your `app.ini` (remove all other `[log]` sections), - then you can find the `gitea.log` 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 ; To show all SQL logs, you can also set LOG_SQL=true in the [database] section [log] @@ -34,9 +34,9 @@ menu: XORM=console,file ENABLE_XORM_LOG=true [log.file.router] - FILE_NAME=gitea.log + FILE_NAME=router.log [log.file.xorm] - FILE_NAME=gitea.log + FILE_NAME=xorm.log ``` 3. Any error messages you are seeing. 4. When possible, try to replicate the issue on [try.gitea.io](https://try.gitea.io) and include steps so that others can reproduce the issue. From d03e37a9639a79e0e2c3803c39b75d5428441a9b Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Thu, 23 Jun 2022 23:54:20 +0800 Subject: [PATCH 5/5] Update seek-help.en-us.md --- docs/content/doc/help/seek-help.en-us.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/content/doc/help/seek-help.en-us.md b/docs/content/doc/help/seek-help.en-us.md index a82677e805d39..3ee160f4316fd 100644 --- a/docs/content/doc/help/seek-help.en-us.md +++ b/docs/content/doc/help/seek-help.en-us.md @@ -33,6 +33,7 @@ menu: ROUTER=console,file XORM=console,file ENABLE_XORM_LOG=true + FILE_NAME=gitea.log [log.file.router] FILE_NAME=router.log [log.file.xorm]