feat[logging]: flexible logging support
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user