improve logging support
This commit is contained in:
parent
0dcb32eed6
commit
37116739cc
3 changed files with 17 additions and 1 deletions
|
@ -129,6 +129,10 @@ The following code has been tested with Debian 8, it should work on Ubuntu as we
|
|||
* `gitea_autowatch_on_change`: Enable this to make users watch a repository after their first commit to it (Default: `true`)
|
||||
* `gitea_show_mailstones_dashboard`: Enable this to show the milestones dashboard page - a view of all the user’s milestones (Default: `true`)
|
||||
|
||||
### Log configuration
|
||||
* `gitea_log_systemd` Disable logging into `file`, use systemd-journald
|
||||
* `gitea_log_only_warning` Log only warnings or above, no http access or sql logging (Default: `true`)
|
||||
|
||||
### Fail2Ban configuration
|
||||
|
||||
If enabled, this will deploy a fail2ban filter and jail config for Gitea as described in the [Gitea Documentation](https://docs.gitea.io/en-us/fail2ban-setup/).
|
||||
|
|
|
@ -72,6 +72,9 @@ gitea_mailer_user: ""
|
|||
gitea_mailer_password: ""
|
||||
gitea_mailer_type: smtp
|
||||
|
||||
gitea_log_systemd: false
|
||||
gitea_log_only_warning: true
|
||||
|
||||
gitea_fail2ban_enabled: false
|
||||
gitea_fail2ban_jail_maxretry: 10
|
||||
gitea_fail2ban_jail_findtime: 3600
|
||||
|
|
|
@ -188,12 +188,21 @@ PATH = {{ gitea_home }}/data/attachments
|
|||
ROOT_PATH = {{ gitea_home }}/log
|
||||
; Either "console", "file", "conn", "smtp" or "database", default is "console"
|
||||
; Use comma to separate multiple modes, e.g. "console, file"
|
||||
MODE = file
|
||||
{% if gitea_log_systemd %}
|
||||
MODE = console
|
||||
{% else %}
|
||||
MODE = file
|
||||
{% endif %}
|
||||
; Buffer length of the channel, keep it as it is if you don't know what it is.
|
||||
BUFFER_LEN = 10000
|
||||
; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
|
||||
{% if gitea_log_only_warning %}
|
||||
LEVEL = Warn
|
||||
REDIRECT_MACARON_LOG = true
|
||||
{% else %}
|
||||
LEVEL = {{ gitea_log_level }}
|
||||
REDIRECT_MACARON_LOG = false
|
||||
{% endif %}
|
||||
|
||||
[oauth2]
|
||||
ENABLE = {{ gitea_oauth2_enabled }}
|
||||
|
|
Loading…
Reference in a new issue