29 lines
1.7 KiB
Django/Jinja
29 lines
1.7 KiB
Django/Jinja
|
|
logging {
|
|
{% filter indent(bind9_config_indent, true) %}
|
|
{% for category in item.logging.categories if item.logging.categories is defined and item.logging.categories %}
|
|
category {{ category.name }} {
|
|
{{ functions.simple_item_list(category.channels) }}};
|
|
{% endfor %}
|
|
{% for channel in item.logging.channels if item.logging.channels is defined and item.logging.channels %}
|
|
channel {{ channel.name }} {
|
|
{% filter indent(bind9_config_indent, true) %}
|
|
{% if channel.file is defined and channel.file %}
|
|
file "{{ channel.file.name }}"
|
|
{{- (' versions ' + channel.file.versions | string) if channel.file.versions is defined and channel.file.versions -}}
|
|
{{- (' size ' + channel.file.size | string) if channel.file.size is defined and channel.file.size -}}
|
|
{{- (' suffix ' + channel.file.suffix | string) if channel.file.suffix is defined and channel.file.suffix -}};
|
|
{% endif %}
|
|
{{ ('null;\n') if channel.null is defined and channel.null -}}
|
|
{{ ('stderr;\n') if channel.stderr is defined and channel.stderr -}}
|
|
{{ ('severity ' + channel.severity + ';\n') if channel.severity is defined and channel.severity -}}
|
|
{{ ('syslog ' + channel.syslog + ';\n') if channel.syslog is defined and channel.syslog -}}
|
|
{{ (functions.boolean_option('buffered', channel.buffered) + '\n') if channel.buffered is defined and channel.buffered -}}
|
|
{{ (functions.boolean_option('print-category', channel.print_category) + '\n') if channel.print_category is defined -}}
|
|
{{ (functions.boolean_option('print-severity', channel.print_severity) + '\n') if channel.print_severity is defined -}}
|
|
{{ ('print-time ' + functions.boolean_or_string(channel.print_time) + ';\n') if channel.print_time is defined and channel.print_time -}}
|
|
{% endfilter %}
|
|
};
|
|
{% endfor %}
|
|
{% endfilter %}};
|