Set named severity logging to debug when needed

When setting debug=True configure the logging to debug level using syslog,
the default's definition is:

channel default_syslog {
        syslog daemon;
        severity info;
};

See http://www.zytrax.com/books/dns/ch7/logging.html

Change-Id: Ibd66195b580405cb88d2865b291ba8d868634124
This commit is contained in:
Felipe Reyes 2019-09-10 14:43:10 -03:00
parent bbb3ef51a6
commit ab4cd0f180
1 changed files with 11 additions and 0 deletions

View File

@ -65,3 +65,14 @@ options {
allow-query { allow_query; };
{%- endif %}
};
{%- if options.debug %}
logging {
channel charm_log {
syslog daemon;
severity debug;
};
category default {
charm_log;
};
};
{%- endif %}