From: Jérémie Galarneau Date: Mon, 31 Aug 2015 22:53:51 +0000 (-0400) Subject: Initialize default log level of events on load X-Git-Tag: v2.8.0-rc1~439 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=f40eba3dc7c35b126aa8ea50fe75a304d9316f5e;p=lttng-tools.git Initialize default log level of events on load Signed-off-by: Jérémie Galarneau --- diff --git a/src/common/config/config.c b/src/common/config/config.c index 140f3b6dc..48dc0b034 100644 --- a/src/common/config/config.c +++ b/src/common/config/config.c @@ -1427,6 +1427,26 @@ int process_event_node(xmlNodePtr event_node, struct lttng_handle *handle, memset(&event, 0, sizeof(event)); + /* Initialize default log level which varies by domain */ + switch (handle->domain.type) + { + case LTTNG_DOMAIN_JUL: + event.loglevel = LTTNG_LOGLEVEL_JUL_ALL; + break; + case LTTNG_DOMAIN_LOG4J: + event.loglevel = LTTNG_LOGLEVEL_LOG4J_ALL; + break; + case LTTNG_DOMAIN_PYTHON: + event.loglevel = LTTNG_LOGLEVEL_PYTHON_DEBUG; + break; + case LTTNG_DOMAIN_UST: + case LTTNG_DOMAIN_KERNEL: + event.loglevel = LTTNG_LOGLEVEL_DEBUG; + break; + default: + assert(0); + } + for (node = xmlFirstElementChild(event_node); node; node = xmlNextElementSibling(node)) { if (!strcmp((const char *) node->name, config_element_name)) {