Add log_level attribute in the Chart to allow overwrite of default

Provide the ability to overwrite the default logging level.
Use 'info' as the default with log_level attribute.

Change-Id: I4bfd82a568c1eaad7de891bd103b3f8ff032e589
This commit is contained in:
Trung Thai 2019-11-18 10:30:25 -05:00
parent 0a8b01bb72
commit e22afb6e95
2 changed files with 9 additions and 0 deletions

View File

@ -5,6 +5,12 @@ $UDPServerRun {{ tuple "maas_region" "podport" "region_syslog" . | include "helm
# Reduce message repetition # Reduce message repetition
$RepeatedMsgReduction on $RepeatedMsgReduction on
# Overwrite default when log_level is set
{{- if .Values.conf.syslog.log_level }}
*.{{ .Values.conf.syslog.log_level }} {{ .Values.conf.syslog.logpath }}/{{ .Values.conf.syslog.logfile }}
{{- end }}
##$RepeatedMsgContainsOriginalMsg on ##$RepeatedMsgContainsOriginalMsg on
:fromhost-ip, !isequal, "127.0.0.1" {{ .Values.conf.syslog.logpath }}/{{ .Values.conf.syslog.logfile }} :fromhost-ip, !isequal, "127.0.0.1" {{ .Values.conf.syslog.logpath }}/{{ .Values.conf.syslog.logfile }}

View File

@ -195,6 +195,9 @@ conf:
rotate: '30' rotate: '30'
# Size threshold when a log should rotate # Size threshold when a log should rotate
size: '100M' size: '100M'
# levels (emerg,alert,crit,error,warning,notice,info,debug)
# use 'info' as default when overwritting the default
log_level: 'info'
maas: maas:
override: override:
append: append: