feat[logging]: flexible logging support

This commit is contained in:
2026-06-28 00:48:50 +03:00
parent 206a8730a8
commit 17aaa41101
10 changed files with 403 additions and 12 deletions
+23
View File
@@ -10,3 +10,26 @@ ssh_key = "/home/user/id_rsa"
# Use this fetch config instead of ssh_key to clone over HTTP(S):
# user = "gitea-user"
# token = "XXXXX"
[logging]
level = "INFO"
# Human-friendly logs in stdout.
[[logging.outputs]]
type = "console"
format = "plain"
stream = "stdout"
# Docker-friendly structured logs in stderr.
[[logging.outputs]]
type = "console"
format = "json"
stream = "stderr"
# Rotating file logs with selectable format.
[[logging.outputs]]
type = "file"
path = "/var/log/gitea-mirror/gitea-mirror.log"
format = "json"
max_size = 10485760
backup_count = 5