improve logging support
This commit is contained in:
parent
2902a99a81
commit
cb08c9f999
3 changed files with 16 additions and 0 deletions
|
@ -120,6 +120,10 @@ The following code has been tested with Debian 8, it should work on Ubuntu as we
|
||||||
* `gitea_mailer_from`: Sender mail address
|
* `gitea_mailer_from`: Sender mail address
|
||||||
* `gitea_enable_notify_mail`: Whether e-mail should be send to watchers of a repository when something happens. Default: `false`
|
* `gitea_enable_notify_mail`: Whether e-mail should be send to watchers of a repository when something happens. Default: `false`
|
||||||
|
|
||||||
|
### 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
|
### 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/).
|
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/).
|
||||||
|
|
|
@ -60,6 +60,9 @@ gitea_mailer_user: ""
|
||||||
gitea_mailer_password: ""
|
gitea_mailer_password: ""
|
||||||
gitea_mailer_type: smtp
|
gitea_mailer_type: smtp
|
||||||
|
|
||||||
|
gitea_log_systemd: false
|
||||||
|
gitea_log_only_warning: true
|
||||||
|
|
||||||
gitea_fail2ban_enabled: false
|
gitea_fail2ban_enabled: false
|
||||||
gitea_fail2ban_jail_maxretry: 10
|
gitea_fail2ban_jail_maxretry: 10
|
||||||
gitea_fail2ban_jail_findtime: 3600
|
gitea_fail2ban_jail_findtime: 3600
|
||||||
|
|
|
@ -186,12 +186,21 @@ PATH = {{ gitea_home }}/data/attachments
|
||||||
ROOT_PATH = {{ gitea_home }}/log
|
ROOT_PATH = {{ gitea_home }}/log
|
||||||
; Either "console", "file", "conn", "smtp" or "database", default is "console"
|
; Either "console", "file", "conn", "smtp" or "database", default is "console"
|
||||||
; Use comma to separate multiple modes, e.g. "console, file"
|
; Use comma to separate multiple modes, e.g. "console, file"
|
||||||
|
{% if gitea_log_systemd %}
|
||||||
|
MODE = console
|
||||||
|
{% else %}
|
||||||
MODE = file
|
MODE = file
|
||||||
|
{% endif %}
|
||||||
; Buffer length of the channel, keep it as it is if you don't know what it is.
|
; Buffer length of the channel, keep it as it is if you don't know what it is.
|
||||||
BUFFER_LEN = 10000
|
BUFFER_LEN = 10000
|
||||||
; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
|
; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
|
||||||
|
{% if gitea_log_only_warning %}
|
||||||
|
LEVEL = Warn
|
||||||
|
REDIRECT_MACARON_LOG = true
|
||||||
|
{% else %}
|
||||||
LEVEL = Info
|
LEVEL = Info
|
||||||
REDIRECT_MACARON_LOG = false
|
REDIRECT_MACARON_LOG = false
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
[oauth2]
|
[oauth2]
|
||||||
ENABLE = {{ gitea_oauth2_enabled }}
|
ENABLE = {{ gitea_oauth2_enabled }}
|
||||||
|
|
Loading…
Reference in a new issue