Commit 955ab340 authored by Pietsch, Martin's avatar Pietsch, Martin
Browse files

implemented logger for different versions

parent b0566ba0
{% from "kea-logger.j2" import logger with context %}
{
"Control-agent": {
"control-sockets": {
......@@ -11,9 +12,19 @@
"socket-name": "/tmp/kea-dhcp6-ctrl.sock"
}
}
{% if kea_version is version("1.8", ">=") %}
,
{{ logger("kea-ctrl-agent") }}
}
{% else %}
},
{% endif %}
{% from "kea-logger.j2" import logger with context %}
{{ logger("kea-ctrl-agent") }}
{% if kea_version is version("1.8", "<") %}
"Logging":
{
{{ logger("kea-ctrl-agent") }}
}
{% endif %}
}
{% from "kea-logger.j2" import logger with context %}
{
"Dhcp4": {
{% if (dhcp_network_interfaces["default"] | default([])) != [] %}
......@@ -100,11 +101,21 @@
{%- endif -%}
{% endfor %}
"subnet4": {{ ipv4subnets | to_nice_json(indent=8) }}
{% if kea_version is version("1.8", ">=") %}
,
{{ logger("kea-dhcp6") }}
}
{% else %}
},
{% endif %}
{% from "kea-logger.j2" import logger with context %}
{{ logger("kea-dhcp4") }}
{% if kea_version is version("1.8", "<") %}
"Logging":
{
{{ logger("kea-dhcp4") }}
}
{% endif %}
}
{% from "kea-logger.j2" import logger with context %}
{
"Dhcp6": {
{% if (dhcp_network_interfaces["default"] | default([])) != [] %}
......@@ -89,10 +90,21 @@
{% endfor %}
"subnet6": {{ ipv6subnets | to_nice_json(indent=8) }}
"subnet6": {{ ipv6subnets | to_nice_json(indent=8) }}
{% if kea_version is version("1.8", ">=") %}
,
{{ logger("kea-dhcp4") }}
}
{% else %}
},
{% endif %}
{% from "kea-logger.j2" import logger with context %}
{{ logger("kea-dhcp6") }}
{% if kea_version is version("1.8", "<") %}
"Logging":
{
{{ logger("kea-dhcp6") }}
}
{% endif %}
}
......@@ -17,10 +17,7 @@
{% else %}
{% do logdata.output_options[0].update({"output": kea_logger_destination }) %}
{% endif %}
"Logging":
{
"loggers": [
{{ logdata | to_nice_json(indent=8) }}
]
}
{% endmacro %}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment