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>
Wed, 23 Sep 2015 20:02:04 +0000 (16:02 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/config/config.c

index 950fec4d1010503be63720619bfb5ec073eaf1f0..dca765b0fd6b23de06c76e67e5f17fde29e554c9 100644 (file)
@@ -1415,6 +1415,23 @@ 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_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.026447 seconds and 4 git commands to generate.