Initialize default log level of events on load
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 31 Aug 2015 22:53:51 +0000 (18:53 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 1 Sep 2015 16:03:08 +0000 (12:03 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/config/config.c

index 140f3b6dc097371de12f15185b4710dd0c6f8579..48dc0b0341eac709442da6fab1bdcc6136bc05b5 100644 (file)
@@ -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)) {
This page took 0.026673 seconds and 4 git commands to generate.