Use DLT_LOG_INFO rather than DLT_LOG_DEBUG for everything
authorJannis Pohlmann <jannis.pohlmann@codethink.co.uk>
Wed, 1 Aug 2012 15:47:50 +0000 (16:47 +0100)
committerJannis Pohlmann <jannis.pohlmann@codethink.co.uk>
Wed, 1 Aug 2012 15:47:50 +0000 (16:47 +0100)
We can't get DLT to log our debug messages, setting LoggingLevel to 7
(LOG_DEBUG) in /etc/dlt.conf does not work as expected. So for now we'll
have to resort to logging all debug messages as info messages.

node-startup-controller/la-handler-service.c
node-startup-controller/luc-starter.c
node-startup-controller/node-startup-controller-application.c
node-startup-controller/node-startup-controller-service.c
node-startup-controller/target-startup-monitor.c
nsm-dummy/nsm-consumer-service.c
nsm-dummy/nsm-dummy-application.c
nsm-dummy/nsm-lifecycle-control-service.c

index d0e2445..9499a97 100644 (file)
@@ -491,7 +491,7 @@ la_handler_service_handle_consumer_lifecycle_request_finish (JobManager  *manage
   g_return_if_fail (data != NULL);
 
   /* log that we are completing a lifecycle request */
-  DLT_LOG (la_handler_context, DLT_LOG_DEBUG,
+  DLT_LOG (la_handler_context, DLT_LOG_INFO,
            DLT_STRING ("Completing a lifecycle request: request id "),
            DLT_UINT (data->request_id));
 
@@ -529,7 +529,7 @@ la_handler_service_handle_consumer_lifecycle_request_finish (JobManager  *manage
     }
   else if (error_status == NSM_ERROR_STATUS_OK)
     {
-      DLT_LOG (la_handler_context, DLT_LOG_DEBUG,
+      DLT_LOG (la_handler_context, DLT_LOG_INFO,
                DLT_STRING ("Successfully notified NSM about completed "
                            "lifecycle request: "),
                DLT_STRING ("request id "), DLT_UINT (data->request_id));
index faa35e8..e2036e0 100644 (file)
@@ -337,7 +337,7 @@ luc_starter_start_next_group (LUCStarter *starter)
   /* fetch the next group */
   group = g_array_index (starter->start_order, gint, 0);
 
-  DLT_LOG (controller_context, DLT_LOG_DEBUG,
+  DLT_LOG (controller_context, DLT_LOG_INFO,
            DLT_STRING ("Starting LUC group: "), DLT_INT (group));
 
   /* look up the apps for the group */
@@ -360,7 +360,7 @@ luc_starter_start_app (const gchar *app,
   g_return_if_fail (app != NULL && *app != '\0');
   g_return_if_fail (IS_LUC_STARTER (starter));
 
-  DLT_LOG (controller_context, DLT_LOG_DEBUG,
+  DLT_LOG (controller_context, DLT_LOG_INFO,
            DLT_STRING ("Starting LUC app: "), DLT_STRING (app));
 
   /* create the new cancellable */
@@ -396,7 +396,7 @@ luc_starter_start_app_finish (JobManager  *manager,
   g_return_if_fail (IS_LUC_STARTER (user_data));
   g_return_if_fail (starter->start_order->len > 0);
 
-  DLT_LOG (controller_context, DLT_LOG_DEBUG,
+  DLT_LOG (controller_context, DLT_LOG_INFO,
            DLT_STRING ("Finished starting LUC app: "), DLT_STRING (unit));
 
   /* respond to errors */
@@ -428,7 +428,7 @@ luc_starter_start_app_finish (JobManager  *manager,
       /* check if this was the last app in the group to be started */
       if (apps->len == 0)
         {
-          DLT_LOG (controller_context, DLT_LOG_DEBUG,
+          DLT_LOG (controller_context, DLT_LOG_INFO,
                    DLT_STRING ("Finished starting LUC group: "), DLT_INT (group));
 
           /* remove the group from the groups and the order */
@@ -493,7 +493,7 @@ luc_starter_check_luc_required_finish (GObject      *object,
                DLT_STRING (error->message));
       g_clear_error (&error);
 
-      DLT_LOG (controller_context, DLT_LOG_DEBUG,
+      DLT_LOG (controller_context, DLT_LOG_INFO,
                DLT_STRING ("Assuming that we should start the LUC"));
 
       /* start all the LUC groups now */
@@ -504,7 +504,7 @@ luc_starter_check_luc_required_finish (GObject      *object,
       /* check whether we need to start the LUC or not */
       if (luc_required)
         {
-          DLT_LOG (controller_context, DLT_LOG_DEBUG,
+          DLT_LOG (controller_context, DLT_LOG_INFO,
                    DLT_STRING ("LUC is required, starting it now"));
 
           /* start all the LUC groups now */
@@ -513,7 +513,7 @@ luc_starter_check_luc_required_finish (GObject      *object,
       else
         {
           /* LUC is not required, log this information */
-          DLT_LOG (controller_context, DLT_LOG_DEBUG, DLT_STRING ("LUC is not required"));
+          DLT_LOG (controller_context, DLT_LOG_INFO, DLT_STRING ("LUC is not required"));
 
           /* notify others that we have started the LUC groups; we haven't
            * in this case but the call of luc_starter_start_groups() may
@@ -543,10 +543,10 @@ luc_starter_start_groups_for_real (LUCStarter *starter)
   g_return_if_fail (IS_LUC_STARTER (starter));
 
   /* log prioritised LUC types */
-  DLT_LOG (controller_context, DLT_LOG_DEBUG, DLT_STRING ("Prioritised LUC types:"));
+  DLT_LOG (controller_context, DLT_LOG_INFO, DLT_STRING ("Prioritised LUC types:"));
   for (n = 0; n < starter->prioritised_types->len; n++)
     {
-      DLT_LOG (controller_context, DLT_LOG_DEBUG,
+      DLT_LOG (controller_context, DLT_LOG_INFO,
                DLT_INT (g_array_index (starter->prioritised_types, gint, n)));
     }
 
@@ -597,10 +597,10 @@ luc_starter_start_groups_for_real (LUCStarter *starter)
     }
   g_array_sort_with_data (starter->start_order, luc_starter_compare_luc_types, starter);
 
-  DLT_LOG (controller_context, DLT_LOG_DEBUG, DLT_STRING ("LUC start groups (ordered):"));
+  DLT_LOG (controller_context, DLT_LOG_INFO, DLT_STRING ("LUC start groups (ordered):"));
   for (n = 0; n < starter->start_order->len; n++)
     {
-      DLT_LOG (controller_context, DLT_LOG_DEBUG,
+      DLT_LOG (controller_context, DLT_LOG_INFO,
                DLT_INT (g_array_index (starter->start_order, gint, n)));
     }
 
index 85f8e00..929fe32 100644 (file)
@@ -222,7 +222,7 @@ node_startup_controller_application_init (NodeStartupControllerApplication *appl
       application->watchdog_client = watchdog_client_new (watchdog_sec);
 
       /* log information about the watchdog timeout using DLT */
-      DLT_LOG (controller_context, DLT_LOG_DEBUG,
+      DLT_LOG (controller_context, DLT_LOG_INFO,
                DLT_STRING ("Updating the systemd watchdog timestamp every "),
                DLT_UINT (watchdog_sec), DLT_STRING (" seconds"));
     }
@@ -365,7 +365,7 @@ node_startup_controller_application_handle_register_finish (GObject      *object
     }
   else if (error_code == NSM_ERROR_STATUS_OK)
     {
-      DLT_LOG (controller_context, DLT_LOG_DEBUG,
+      DLT_LOG (controller_context, DLT_LOG_INFO,
                DLT_STRING ("Successfully registered the node startup controller "
                            "as a shutdown consumer"));
     }
@@ -405,7 +405,7 @@ node_startup_controller_application_handle_unregister_finish (GObject      *obje
     }
   else if (error_code == NSM_ERROR_STATUS_OK)
     {
-      DLT_LOG (controller_context, DLT_LOG_DEBUG,
+      DLT_LOG (controller_context, DLT_LOG_INFO,
                DLT_STRING ("Successfully unregistered the node startup controller "
                            "as a shutdown consumer"));
     }
index a5510a4..91d6e94 100644 (file)
@@ -407,7 +407,7 @@ node_startup_controller_service_handle_register_with_luc (NodeStartupController
 
   /* log the new last user context */
   debug_text = g_variant_print (service->current_user_context, TRUE);
-  DLT_LOG (controller_context, DLT_LOG_DEBUG,
+  DLT_LOG (controller_context, DLT_LOG_INFO,
            DLT_STRING ("Updated LUC to: "), DLT_STRING (debug_text));
   g_free (debug_text);
 
index 7d29f10..635ee74 100644 (file)
@@ -310,7 +310,7 @@ target_startup_monitor_get_unit_finish (GObject      *object,
     }
   else
     {
-      DLT_LOG (controller_context, DLT_LOG_DEBUG,
+      DLT_LOG (controller_context, DLT_LOG_INFO,
                DLT_STRING ("Creating D-Bus proxy for unit \""), DLT_STRING (object_path),
                DLT_STRING ("\""));
 
@@ -361,7 +361,7 @@ target_startup_monitor_unit_proxy_new_finish (GObject      *object,
       state = systemd_unit_get_active_state (unit);
 
       /* log the the active state has changed */
-      DLT_LOG (controller_context, DLT_LOG_DEBUG,
+      DLT_LOG (controller_context, DLT_LOG_INFO,
                DLT_STRING ("Active state of unit \""), DLT_STRING (data->unit_name),
                DLT_STRING ("\" changed to "), DLT_STRING (state));
 
index 5b0a08b..34a8f92 100644 (file)
@@ -277,7 +277,7 @@ nsm_consumer_service_handle_register_shutdown_client (NSMConsumer           *obj
       g_dbus_proxy_set_default_timeout (G_DBUS_PROXY (consumer), timeout);
 
       /* log information about the re-registration */
-      DLT_LOG (nsm_dummy_context, DLT_LOG_DEBUG,
+      DLT_LOG (nsm_dummy_context, DLT_LOG_INFO,
                DLT_STRING ("Re-registered shutdown client: "),
                DLT_STRING ("bus name "), DLT_STRING (bus_name),
                DLT_STRING (", object path "), DLT_STRING (object_path),
@@ -321,7 +321,7 @@ nsm_consumer_service_handle_register_shutdown_client (NSMConsumer           *obj
                                                  shutdown_client);
 
       /* log the registered shutdown client */
-      DLT_LOG (nsm_dummy_context, DLT_LOG_DEBUG,
+      DLT_LOG (nsm_dummy_context, DLT_LOG_INFO,
                DLT_STRING ("Shutdown client registered: "),
                DLT_STRING ("bus name "), DLT_STRING (bus_name),
                DLT_STRING (", object path "), DLT_STRING (object_path),
@@ -391,7 +391,7 @@ nsm_consumer_service_handle_unregister_shutdown_client (NSMConsumer           *o
       if (shutdown_client_get_shutdown_mode (shutdown_client) == 0)
         {
           /* log the unregistration now */
-          DLT_LOG (nsm_dummy_context, DLT_LOG_DEBUG,
+          DLT_LOG (nsm_dummy_context, DLT_LOG_INFO,
                    DLT_STRING ("Shutdown client unregistered: "),
                    DLT_STRING ("bus name "), DLT_STRING (bus_name),
                    DLT_STRING (", object path "), DLT_STRING (object_path));
@@ -430,7 +430,7 @@ nsm_consumer_service_handle_lifecycle_request_complete (NSMConsumer           *o
   g_return_val_if_fail (G_IS_DBUS_METHOD_INVOCATION (invocation), FALSE);
   g_return_val_if_fail (NSM_CONSUMER_IS_SERVICE (service), FALSE);
 
-  DLT_LOG (nsm_dummy_context, DLT_LOG_DEBUG,
+  DLT_LOG (nsm_dummy_context, DLT_LOG_INFO,
            DLT_STRING ("Finished shutting down client: "),
            DLT_STRING ("request id "), DLT_UINT (request_id),
            DLT_STRING (", status "), DLT_UINT (status));
@@ -495,19 +495,19 @@ nsm_consumer_service_shut_down_next_client_in_queue (NSMConsumerService *service
   g_return_if_fail (NSM_CONSUMER_IS_SERVICE (service));
   g_return_if_fail (service->shutdown_queue != NULL);
 
-  DLT_LOG (nsm_dummy_context, DLT_LOG_DEBUG,
+  DLT_LOG (nsm_dummy_context, DLT_LOG_INFO,
            DLT_STRING ("Shutting down next client in queue"));
 
   /* check if we have processed all clients in the queue */
   if (service->shutdown_queue->remaining_clients == NULL)
     {
-      DLT_LOG (nsm_dummy_context, DLT_LOG_DEBUG,
+      DLT_LOG (nsm_dummy_context, DLT_LOG_INFO,
                DLT_STRING ("Processed all items in the queue for this mode"));
 
       /* check if we have processed all shutdown modes */
       if (service->shutdown_queue->current_mode == NSM_SHUTDOWN_TYPE_NORMAL)
         {
-          DLT_LOG (nsm_dummy_context, DLT_LOG_DEBUG,
+          DLT_LOG (nsm_dummy_context, DLT_LOG_INFO,
                    DLT_STRING ("All clients have been shut down"));
 
           /* fast and normal have been processed, we are finished */
@@ -521,7 +521,7 @@ nsm_consumer_service_shut_down_next_client_in_queue (NSMConsumerService *service
         }
       else if (service->shutdown_queue->current_mode == NSM_SHUTDOWN_TYPE_FAST)
         {
-          DLT_LOG (nsm_dummy_context, DLT_LOG_DEBUG,
+          DLT_LOG (nsm_dummy_context, DLT_LOG_INFO,
                    DLT_STRING ("Transitioning to normal shutdown mode"));
 
           /* move on to normal shutdown mode and reset clients to be processed */
@@ -545,7 +545,7 @@ nsm_consumer_service_shut_down_next_client_in_queue (NSMConsumerService *service
   if ((shutdown_client_get_shutdown_mode (client)
        & service->shutdown_queue->current_mode) != 0)
     {
-      DLT_LOG (nsm_dummy_context, DLT_LOG_DEBUG,
+      DLT_LOG (nsm_dummy_context, DLT_LOG_INFO,
                DLT_STRING ("Shutting down a client: "),
                DLT_STRING ("bus name "),
                DLT_STRING (shutdown_client_get_bus_name (client)),
@@ -571,7 +571,7 @@ nsm_consumer_service_shut_down_next_client_in_queue (NSMConsumerService *service
     }
   else
     {
-      DLT_LOG (nsm_dummy_context, DLT_LOG_DEBUG,
+      DLT_LOG (nsm_dummy_context, DLT_LOG_INFO,
                DLT_STRING ("Skipping client "),
                DLT_STRING (shutdown_client_get_object_path (client)),
                DLT_STRING (": it is not registered for shutdown mode "),
@@ -629,7 +629,7 @@ nsm_consumer_service_lifecycle_request_finish (GObject      *object,
   else if (error_code == NSM_ERROR_STATUS_OK)
     {
       /* log the successful shutdown */
-      DLT_LOG (nsm_dummy_context, DLT_LOG_DEBUG,
+      DLT_LOG (nsm_dummy_context, DLT_LOG_INFO,
                DLT_STRING ("Successfully shut down client: "),
                DLT_STRING ("bus name "),
                DLT_STRING (shutdown_client_get_bus_name (client)),
@@ -649,7 +649,7 @@ nsm_consumer_service_lifecycle_request_finish (GObject      *object,
   else if (error_code == NSM_ERROR_STATUS_RESPONSE_PENDING)
     {
       /* log that we are waiting for the client to finish its shutdown */
-      DLT_LOG (nsm_dummy_context, DLT_LOG_DEBUG,
+      DLT_LOG (nsm_dummy_context, DLT_LOG_INFO,
                DLT_STRING ("Waiting for client to shut down: "),
                DLT_STRING ("request id "),
                DLT_UINT (GPOINTER_TO_UINT (client)),
index 0f54a23..fccc13c 100644 (file)
@@ -172,7 +172,7 @@ nsm_dummy_application_init (NSMDummyApplication *application)
       application->watchdog_client = watchdog_client_new (watchdog_sec);
 
       /* log information about the watchdog timeout using DLT */
-      DLT_LOG (nsm_dummy_context, DLT_LOG_DEBUG,
+      DLT_LOG (nsm_dummy_context, DLT_LOG_INFO,
                DLT_STRING ("Updating the systemd watchdog timestamp every "),
                DLT_UINT (watchdog_sec), DLT_STRING (" seconds"));
     }
index 0450af0..9f918bf 100644 (file)
@@ -201,7 +201,7 @@ nsm_lifecycle_control_service_handle_set_node_state (NSMLifecycleControl
   if (node_state_id >= NSM_NODE_STATE_NOT_SET && node_state_id <= NSM_NODE_STATE_LAST)
     {
       /* log how we handled the node state */
-      DLT_LOG (nsm_dummy_context, DLT_LOG_DEBUG,
+      DLT_LOG (nsm_dummy_context, DLT_LOG_INFO,
                DLT_STRING ("Node state "), DLT_INT (node_state_id),
                DLT_STRING (" applied: "),
                DLT_STRING (service->accept_state ? "yes" : "no"));
@@ -217,7 +217,7 @@ nsm_lifecycle_control_service_handle_set_node_state (NSMLifecycleControl
   else
     {
       /* log how we handled the node state */
-      DLT_LOG (nsm_dummy_context, DLT_LOG_DEBUG,
+      DLT_LOG (nsm_dummy_context, DLT_LOG_INFO,
                DLT_STRING ("Received an invalid node state: "), DLT_INT (node_state_id));
 
       /* let the caller know that it sent an invalid parameter */