summaryrefslogtreecommitdiffstats
path: root/manager/knot_resolver_manager/datamodel/templates/policy-config.lua.j2
blob: 4c5c9048493ee0e930a4f4149fa7c262a8db5798 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{% if not cfg.lua.script_only %}

-- FFI library
ffi = require('ffi')
local C = ffi.C

-- logging.level
log_level('{{ cfg.logging.level }}')

{% if cfg.logging.target -%}
-- logging.target
log_target('{{ cfg.logging.target }}')
{%- endif %}

{% if cfg.logging.groups %}
-- logging.groups
log_groups({
{% for g in cfg.logging.groups %}
{% if g != "manager" and g != "supervisord" and g != "cache-gc" %}
    '{{ g }}',
{% endif %}
{% endfor %}
})
{% endif %}

-- Config required for the cache opening
cache.open({{ cfg.cache.size_max.bytes() }}, 'lmdb://{{ cfg.cache.storage }}')

-- VIEWS section ------------------------------------
{% include "views.lua.j2" %}

-- LOCAL-DATA section -------------------------------
{% include "local_data.lua.j2" %}

-- FORWARD section ----------------------------------
{% include "forward.lua.j2" %}

{% endif %}

quit()