Rework log messages a bit to make them more readable
authorJannis Pohlmann <jannis.pohlmann@codethink.co.uk>
Wed, 1 Aug 2012 16:31:50 +0000 (17:31 +0100)
committerJannis Pohlmann <jannis.pohlmann@codethink.co.uk>
Wed, 1 Aug 2012 16:31:50 +0000 (17:31 +0100)
legacy-app-handler/main.c
node-startup-controller/la-handler-service.c
node-startup-controller/luc-starter.c
node-startup-controller/main.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/main.c
nsm-dummy/nsm-consumer-service.c
nsm-dummy/nsm-dummy-application.c
nsm-dummy/nsm-lifecycle-control-service.c

index 559c0fd..66d7f3e 100644 (file)
@@ -82,7 +82,7 @@ main (int    argc,
     {
       /* parsing failed, exit with an error */
       DLT_LOG (la_handler_context, DLT_LOG_ERROR,
-               DLT_STRING ("Failed to parse command line options: "),
+               DLT_STRING ("Failed to parse command line options:"),
                DLT_STRING (error->message));
 
       /* clean up */
@@ -98,7 +98,8 @@ main (int    argc,
   if (unit == NULL || *unit == '\0')
     {
       DLT_LOG (la_handler_context, DLT_LOG_ERROR,
-               DLT_STRING ("Failed to register legacy application: no unit specified"));
+               DLT_STRING ("Failed to register legacy application:"),
+               DLT_STRING ("no unit specified"));
 
       /* free command line options */
       g_free (unit);
@@ -113,7 +114,7 @@ main (int    argc,
     {
       DLT_LOG (la_handler_context, DLT_LOG_ERROR,
                DLT_STRING ("Failed to register legacy application: "
-                           "invalid shutdown mode \"0x%x\""), DLT_INT (shutdown_mode));
+                           "invalid shutdown mode"), DLT_INT (shutdown_mode));
 
       /* free command line options */
       g_free (unit);
@@ -125,8 +126,8 @@ main (int    argc,
   if (timeout < 0)
     {
       DLT_LOG (la_handler_context, DLT_LOG_ERROR,
-               DLT_STRING ("Failed to register legacy application: "
-                           "shutdown timeout must be non-negative"));
+               DLT_STRING ("Failed to register legacy application:"),
+               DLT_STRING ("shutdown timeout must be non-negative"));
 
       /* free command line options */
       g_free (unit);
@@ -146,7 +147,7 @@ main (int    argc,
   if (error != NULL)
     {
       DLT_LOG (la_handler_context, DLT_LOG_ERROR,
-               DLT_STRING ("Failed to register legacy application: "),
+               DLT_STRING ("Failed to register legacy application:"),
                DLT_STRING (error->message));
 
       /* clean up */
@@ -163,7 +164,7 @@ main (int    argc,
                                       NULL, &error))
     {
       DLT_LOG (la_handler_context, DLT_LOG_ERROR,
-               DLT_STRING ("Failed to register legacy application: "),
+               DLT_STRING ("Failed to register legacy application:"),
                DLT_STRING (error->message));
 
       /* clean up */
index 9499a97..4cc9727 100644 (file)
@@ -168,7 +168,7 @@ la_handler_service_constructed (GObject *object)
   if (error != NULL)
     {
       DLT_LOG (la_handler_context, DLT_LOG_ERROR,
-               DLT_STRING ("Failed to connect to the NSM consumer: "),
+               DLT_STRING ("Failed to connect to the NSM consumer:"),
                DLT_STRING (error->message));
       g_error_free (error);
     }
@@ -361,7 +361,7 @@ la_handler_service_handle_register (LAHandler             *interface,
       if (error != NULL)
         {
           DLT_LOG (la_handler_context, DLT_LOG_ERROR,
-                   DLT_STRING ("Failed to export shutdown consumer on the bus: "),
+                   DLT_STRING ("Failed to export shutdown consumer on the bus:"),
                    DLT_STRING (error->message));
           g_error_free (error);
         }
@@ -412,7 +412,7 @@ la_handler_service_handle_register_finish (GObject      *object,
   if (error != NULL)
     {
       DLT_LOG (la_handler_context, DLT_LOG_ERROR,
-               DLT_STRING ("Failed to register a shutdown consumer: "),
+               DLT_STRING ("Failed to register a shutdown consumer:"),
                DLT_STRING (error->message));
       g_error_free (error);
     }
@@ -492,14 +492,14 @@ la_handler_service_handle_consumer_lifecycle_request_finish (JobManager  *manage
 
   /* log that we are completing a lifecycle request */
   DLT_LOG (la_handler_context, DLT_LOG_INFO,
-           DLT_STRING ("Completing a lifecycle request: request id "),
-           DLT_UINT (data->request_id));
+           DLT_STRING ("Completing a lifecycle request:"),
+           DLT_STRING ("request id"), DLT_UINT (data->request_id));
 
   /* log an error if shutting down the consumer has failed */
   if (error != NULL)
     {
       DLT_LOG (la_handler_context, DLT_LOG_ERROR,
-               DLT_STRING ("Failed to shut down a shutdown consumer: "),
+               DLT_STRING ("Failed to shut down a shutdown consumer:"),
                DLT_STRING (error->message));
 
       /* send an error back to the NSM */
@@ -522,24 +522,24 @@ la_handler_service_handle_consumer_lifecycle_request_finish (JobManager  *manage
                                                           &error_status, NULL, &err))
     {
       DLT_LOG (la_handler_context, DLT_LOG_ERROR,
-               DLT_STRING ("Failed to notify NSM about completed lifecycle request: "),
-               DLT_STRING ("request id "), DLT_UINT (data->request_id),
-               DLT_STRING (""), DLT_STRING (error->message));
+               DLT_STRING ("Failed to notify NSM about completed lifecycle request:"),
+               DLT_STRING ("request id"), DLT_UINT (data->request_id),
+               DLT_STRING ("error message"), DLT_STRING (error->message));
       g_error_free (err);
     }
   else if (error_status == NSM_ERROR_STATUS_OK)
     {
       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));
+                           "lifecycle request:"),
+               DLT_STRING ("request id"), DLT_UINT (data->request_id));
     }
   else
     {
       DLT_LOG (la_handler_context, DLT_LOG_ERROR,
-               DLT_STRING ("Failed to notify NSM about completed lifecycle request: "),
-               DLT_STRING ("request id "), DLT_UINT (data->request_id),
-               DLT_STRING (", error status "), DLT_INT (error_status));
+               DLT_STRING ("Failed to notify NSM about completed lifecycle request:"),
+               DLT_STRING ("request id"), DLT_UINT (data->request_id),
+               DLT_STRING ("error status"), DLT_INT (error_status));
     }
 
   la_handler_service_data_unref (data);
@@ -652,17 +652,19 @@ la_handler_service_deregister_consumers (LAHandlerService *service)
       if (error != NULL)
         {
           DLT_LOG (la_handler_context, DLT_LOG_ERROR,
-                   DLT_STRING ("Failed to unregister shutdown client "),
-                   DLT_STRING (object_path), DLT_STRING (" for unit "), DLT_STRING (unit),
-                   DLT_STRING (": "), DLT_STRING (error->message));
+                   DLT_STRING ("Failed to unregister shutdown client:"),
+                   DLT_STRING ("object path"), DLT_STRING (object_path),
+                   DLT_STRING ("unit"), DLT_STRING (unit),
+                   DLT_STRING ("error message"), DLT_STRING (error->message));
           g_error_free (error);
         }
       else if (error_code != NSM_ERROR_STATUS_OK)
         {
           DLT_LOG (la_handler_context, DLT_LOG_ERROR,
-                   DLT_STRING ("Failed to unregister shutdown client "),
-                   DLT_STRING (object_path), DLT_STRING (" for unit "), DLT_STRING (unit),
-                   DLT_STRING (": error code "), DLT_INT (error_code));
+                   DLT_STRING ("Failed to unregister shutdown client:"),
+                   DLT_STRING ("object path"), DLT_STRING (object_path),
+                   DLT_STRING ("unit"), DLT_STRING (unit),
+                   DLT_STRING ("error code"), DLT_INT (error_code));
         }
     }
 }
index e2036e0..6391a27 100644 (file)
@@ -189,7 +189,7 @@ luc_starter_constructed (GObject *object)
   if (error != NULL)
     {
       DLT_LOG (controller_context, DLT_LOG_ERROR,
-               DLT_STRING ("Failed to connect to the NSM lifecycle control: "),
+               DLT_STRING ("Failed to connect to the NSM lifecycle control:"),
                DLT_STRING (error->message));
       g_error_free (error);
     }
@@ -338,7 +338,7 @@ luc_starter_start_next_group (LUCStarter *starter)
   group = g_array_index (starter->start_order, gint, 0);
 
   DLT_LOG (controller_context, DLT_LOG_INFO,
-           DLT_STRING ("Starting LUC group: "), DLT_INT (group));
+           DLT_STRING ("Starting LUC group:"), DLT_INT (group));
 
   /* look up the apps for the group */
   apps = g_hash_table_lookup (starter->start_groups, GINT_TO_POINTER (group));
@@ -361,7 +361,7 @@ luc_starter_start_app (const gchar *app,
   g_return_if_fail (IS_LUC_STARTER (starter));
 
   DLT_LOG (controller_context, DLT_LOG_INFO,
-           DLT_STRING ("Starting LUC app: "), DLT_STRING (app));
+           DLT_STRING ("Starting LUC app:"), DLT_STRING (app));
 
   /* create the new cancellable */
   cancellable = g_cancellable_new ();
@@ -397,14 +397,15 @@ luc_starter_start_app_finish (JobManager  *manager,
   g_return_if_fail (starter->start_order->len > 0);
 
   DLT_LOG (controller_context, DLT_LOG_INFO,
-           DLT_STRING ("Finished starting LUC app: "), DLT_STRING (unit));
+           DLT_STRING ("Finished starting LUC app:"), DLT_STRING (unit));
 
   /* respond to errors */
   if (error != NULL)
     {
       DLT_LOG (controller_context, DLT_LOG_ERROR,
-               DLT_STRING ("Failed to start the LUC application \""),
-               DLT_STRING (unit), DLT_STRING ("\": "), DLT_STRING (error->message));
+               DLT_STRING ("Failed to start LUC application:"),
+               DLT_STRING ("unit"), DLT_STRING (unit),
+               DLT_STRING ("error message"), DLT_STRING (error->message));
     }
 
   /* get the current start group */
@@ -429,7 +430,7 @@ luc_starter_start_app_finish (JobManager  *manager,
       if (apps->len == 0)
         {
           DLT_LOG (controller_context, DLT_LOG_INFO,
-                   DLT_STRING ("Finished starting LUC group: "), DLT_INT (group));
+                   DLT_STRING ("Finished starting LUC group:"), DLT_INT (group));
 
           /* remove the group from the groups and the order */
           g_hash_table_remove (starter->start_groups, GINT_TO_POINTER (group));
@@ -489,7 +490,7 @@ luc_starter_check_luc_required_finish (GObject      *object,
                                                              &luc_required, res, &error))
     {
       DLT_LOG (controller_context, DLT_LOG_ERROR,
-               DLT_STRING ("Failed to check whether the LUC is required: "),
+               DLT_STRING ("Failed to check whether the LUC is required:"),
                DLT_STRING (error->message));
       g_clear_error (&error);
 
@@ -566,7 +567,7 @@ luc_starter_start_groups_for_real (LUCStarter *starter)
   if (error != NULL)
     {
       DLT_LOG (controller_context, DLT_LOG_ERROR,
-               DLT_STRING ("Failed to read the last user context: "),
+               DLT_STRING ("Failed to read the last user context:"),
                DLT_STRING (error->message));
       g_error_free (error);
       return;
index c3093d9..74bb409 100644 (file)
@@ -78,7 +78,7 @@ main (int    argc,
   if (connection == NULL)
     {
       DLT_LOG (controller_context, DLT_LOG_FATAL,
-               DLT_STRING ("Failed to connect to the system bus: "),
+               DLT_STRING ("Failed to connect to the system bus:"),
                DLT_STRING (error->message));
 
       /* clean up */
@@ -97,7 +97,7 @@ main (int    argc,
   if (systemd_manager == NULL)
     {
       DLT_LOG (controller_context, DLT_LOG_FATAL,
-               DLT_STRING ("Failed to connect to the systemd manager: "),
+               DLT_STRING ("Failed to connect to the systemd manager:"),
                DLT_STRING (error->message));
 
       /* clean up */
@@ -111,7 +111,7 @@ main (int    argc,
   if (!systemd_manager_call_subscribe_sync (systemd_manager, NULL, &error))
     {
       DLT_LOG (controller_context, DLT_LOG_FATAL,
-               DLT_STRING ("Failed to subscribe to the systemd manager: "),
+               DLT_STRING ("Failed to subscribe to the systemd manager:"),
                DLT_STRING (error->message));
 
       /* clean up */
@@ -128,7 +128,7 @@ main (int    argc,
   if (!node_startup_controller_service_start_up (node_startup_controller, &error))
     {
       DLT_LOG (controller_context, DLT_LOG_ERROR,
-               DLT_STRING ("Failed to start the node startup controller service: "),
+               DLT_STRING ("Failed to start the node startup controller service:"),
                DLT_STRING (error->message));
 
       /* clean up */
@@ -150,7 +150,7 @@ main (int    argc,
   if (!la_handler_service_start (la_handler_service, &error))
     {
       DLT_LOG (controller_context, DLT_LOG_FATAL,
-               DLT_STRING ("Failed to start the legacy app handler service: "),
+               DLT_STRING ("Failed to start the legacy app handler service:"),
                DLT_STRING (error->message));
 
       /* clean up */
index 929fe32..b2edc1b 100644 (file)
@@ -223,8 +223,8 @@ node_startup_controller_application_init (NodeStartupControllerApplication *appl
 
       /* log information about the watchdog timeout using DLT */
       DLT_LOG (controller_context, DLT_LOG_INFO,
-               DLT_STRING ("Updating the systemd watchdog timestamp every "),
-               DLT_UINT (watchdog_sec), DLT_STRING (" seconds"));
+               DLT_STRING ("Updating the systemd watchdog timestamp every"),
+               DLT_UINT (watchdog_sec), DLT_STRING ("seconds"));
     }
 }
 
@@ -324,7 +324,7 @@ node_startup_controller_application_constructed (GObject *object)
                                          application->connection, object_path, &error))
     {
       DLT_LOG (controller_context, DLT_LOG_ERROR,
-               DLT_STRING ("Failed to export shutdown consumer on the bus: "),
+               DLT_STRING ("Failed to export shutdown consumer on the bus:"),
                DLT_STRING (error->message));
       g_clear_error (&error);
     }
@@ -360,7 +360,7 @@ node_startup_controller_application_handle_register_finish (GObject      *object
     {
       DLT_LOG (controller_context, DLT_LOG_ERROR,
                DLT_STRING ("Failed to register the node startup controller "
-                           "as a shutdown consumer: "), DLT_STRING (error->message));
+                           "as a shutdown consumer:"), DLT_STRING (error->message));
       g_error_free (error);
     }
   else if (error_code == NSM_ERROR_STATUS_OK)
@@ -373,8 +373,8 @@ node_startup_controller_application_handle_register_finish (GObject      *object
     {
       DLT_LOG (controller_context, DLT_LOG_ERROR,
                DLT_STRING ("Failed to register the node startup controller "
-                           "as a shutdown consumer: error status "),
-               DLT_INT (error_code));
+                           "as a shutdown consumer:"),
+               DLT_STRING ("error status"), DLT_INT (error_code));
     }
 }
 
@@ -400,7 +400,7 @@ node_startup_controller_application_handle_unregister_finish (GObject      *obje
     {
       DLT_LOG (controller_context, DLT_LOG_ERROR,
                DLT_STRING ("Failed to unregister the node startup controller "
-                           "as a shutdown consumer: "), DLT_STRING (error->message));
+                           "as a shutdown consumer:"), DLT_STRING (error->message));
       g_error_free (error);
     }
   else if (error_code == NSM_ERROR_STATUS_OK)
@@ -413,8 +413,8 @@ node_startup_controller_application_handle_unregister_finish (GObject      *obje
     {
       DLT_LOG (controller_context, DLT_LOG_ERROR,
                DLT_STRING ("Failed to unregister the node startup controller "
-                           "as a shutdown consumer: error status "),
-               DLT_INT (error_code));
+                           "as a shutdown consumer:"),
+               DLT_STRING ("error status"), DLT_INT (error_code));
     }
 
   /* quit the application */
index 91d6e94..5e624e8 100644 (file)
@@ -239,8 +239,8 @@ node_startup_controller_service_handle_finish_luc_registration (NodeStartupContr
   if (!service->started_registration)
     {
       DLT_LOG (controller_context, DLT_LOG_ERROR,
-               DLT_STRING ("Failed to finish the LUC registration: "
-                           "the registration sequence was not started properly"));
+               DLT_STRING ("Failed to finish the LUC registration:"),
+               DLT_STRING ("the registration sequence was not started properly"));
 
       /* notify the caller that we have handled the method call */
       g_dbus_method_invocation_return_value (invocation, NULL);
@@ -252,7 +252,7 @@ node_startup_controller_service_handle_finish_luc_registration (NodeStartupContr
   if (error != NULL)
    {
      DLT_LOG (controller_context, DLT_LOG_ERROR,
-              DLT_STRING ("Failed to finish the LUC registration: "),
+              DLT_STRING ("Failed to finish the LUC registration:"),
               DLT_STRING (error->message));
      g_error_free (error);
    }
@@ -301,8 +301,8 @@ node_startup_controller_service_handle_register_with_luc (NodeStartupController
   if (!service->started_registration)
     {
       DLT_LOG (controller_context, DLT_LOG_ERROR,
-               DLT_STRING ("Failed to register apps with the LUC: "
-                           "the registration sequence was not started properly"));
+               DLT_STRING ("Failed to register apps with the LUC:"),
+               DLT_STRING ("the registration sequence was not started properly"));
 
       /* notify the caller that we have handled the register request */
       g_dbus_method_invocation_return_value (invocation, NULL);
@@ -408,7 +408,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_INFO,
-           DLT_STRING ("Updated LUC to: "), DLT_STRING (debug_text));
+           DLT_STRING ("Updated LUC to:"), DLT_STRING (debug_text));
   g_free (debug_text);
 
   /* release the current context */
index 635ee74..1c85dec 100644 (file)
@@ -143,7 +143,7 @@ target_startup_monitor_init (TargetStartupMonitor *monitor)
   if (error != NULL)
     {
       DLT_LOG (controller_context, DLT_LOG_ERROR,
-               DLT_STRING ("Failed to connect to the NSM lifecycle control: "),
+               DLT_STRING ("Failed to connect to the NSM lifecycle control:"),
                DLT_STRING (error->message));
       g_error_free (error);
     }
@@ -299,8 +299,9 @@ target_startup_monitor_get_unit_finish (GObject      *object,
     {
       /* there was an error, log it */
       DLT_LOG (controller_context, DLT_LOG_ERROR,
-               DLT_STRING ("Failed to get unit \""), DLT_STRING (data->unit_name),
-               DLT_STRING ("\" from systemd: "), DLT_STRING (error->message));
+               DLT_STRING ("Failed to get a unit from systemd:"),
+               DLT_STRING ("unit"), DLT_STRING (data->unit_name),
+               DLT_STRING ("error message"), DLT_STRING (error->message));
       g_error_free (error);
 
       /* release the get unit data */
@@ -311,8 +312,8 @@ target_startup_monitor_get_unit_finish (GObject      *object,
   else
     {
       DLT_LOG (controller_context, DLT_LOG_INFO,
-               DLT_STRING ("Creating D-Bus proxy for unit \""), DLT_STRING (object_path),
-               DLT_STRING ("\""));
+               DLT_STRING ("Creating D-Bus proxy:"),
+               DLT_STRING ("object path"), DLT_STRING (object_path));
 
       /* remember the object path */
       data->object_path = object_path;
@@ -350,9 +351,9 @@ target_startup_monitor_unit_proxy_new_finish (GObject      *object,
     {
       /* there was an error, log it */
       DLT_LOG (controller_context, DLT_LOG_ERROR,
-               DLT_STRING ("Failed to create D-Bus proxy for unit \""),
-               DLT_STRING (data->object_path), DLT_STRING ("\": "),
-               DLT_STRING (error->message));
+               DLT_STRING ("Failed to create D-Bus proxy:"),
+               DLT_STRING ("object path"), DLT_STRING (data->object_path),
+               DLT_STRING ("error message"), DLT_STRING (error->message));
       g_error_free (error);
     }
   else
@@ -362,8 +363,9 @@ target_startup_monitor_unit_proxy_new_finish (GObject      *object,
 
       /* log the the active state has changed */
       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));
+               DLT_STRING ("Active state of unit changed:"),
+               DLT_STRING ("unit"), DLT_STRING (data->unit_name),
+               DLT_STRING ("state"), DLT_STRING (state));
 
       /* check if the new state is active */
       if (g_strcmp0 (state, "active") == 0)
@@ -424,15 +426,15 @@ target_startup_monitor_set_node_state_finish (GObject      *object,
                                                          &error))
     {
       DLT_LOG (controller_context, DLT_LOG_ERROR,
-               DLT_STRING ("Failed to set the node state: "),
+               DLT_STRING ("Failed to set the node state:"),
                DLT_STRING (error->message));
       g_error_free (error);
     }
   else if (error_code != NSM_ERROR_STATUS_OK)
     {
       DLT_LOG (controller_context, DLT_LOG_ERROR,
-               DLT_STRING ("Failed to set the node state: error code "),
-               DLT_UINT (error_code));
+               DLT_STRING ("Failed to set the node state:"),
+               DLT_STRING ("error code"), DLT_UINT (error_code));
     }
 }
 
index fdb96e1..0404d0d 100644 (file)
@@ -66,7 +66,7 @@ main (int    argc,
   if (connection == NULL)
     {
       DLT_LOG (nsm_dummy_context, DLT_LOG_FATAL,
-               DLT_STRING ("Failed to connect to D-Bus: "),
+               DLT_STRING ("Failed to connect to D-Bus:"),
                DLT_STRING (error->message));
 
       /* clean up */
@@ -80,7 +80,7 @@ main (int    argc,
   if (!nsm_lifecycle_control_service_start (lifecycle_control_service, &error))
     {
       DLT_LOG (nsm_dummy_context, DLT_LOG_FATAL,
-               DLT_STRING ("Failed to start the lifecycle control service: "),
+               DLT_STRING ("Failed to start the lifecycle control service:"),
                DLT_STRING (error->message));
 
       /* clean up */
@@ -96,7 +96,7 @@ main (int    argc,
   if (!nsm_consumer_service_start (consumer_service, &error))
     {
       DLT_LOG (nsm_dummy_context, DLT_LOG_FATAL,
-               DLT_STRING ("Failed to start the consumer service: "),
+               DLT_STRING ("Failed to start the consumer service:"),
                DLT_STRING (error->message));
 
       /* clean up */
index 34a8f92..11ebd40 100644 (file)
@@ -278,12 +278,12 @@ nsm_consumer_service_handle_register_shutdown_client (NSMConsumer           *obj
 
       /* log information about the re-registration */
       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),
-               DLT_STRING (", new shutdown mode "),
+               DLT_STRING ("Re-registered shutdown client:"),
+               DLT_STRING ("bus name"), DLT_STRING (bus_name),
+               DLT_STRING ("object path"), DLT_STRING (object_path),
+               DLT_STRING ("new shutdown mode"),
                DLT_UINT (shutdown_client_get_shutdown_mode (shutdown_client)),
-               DLT_STRING (", new timeout "),
+               DLT_STRING ("new timeout"),
                DLT_UINT (shutdown_client_get_timeout (shutdown_client)));
     }
   else
@@ -297,9 +297,9 @@ nsm_consumer_service_handle_register_shutdown_client (NSMConsumer           *obj
         {
           /* log the error */
           DLT_LOG (nsm_dummy_context, DLT_LOG_ERROR,
-                   DLT_STRING ("Failed to register shutdown client "),
-                   DLT_STRING (object_path), DLT_STRING (": "),
-                   DLT_STRING (error->message));
+                   DLT_STRING ("Failed to register shutdown client:"),
+                   DLT_STRING ("object path"), DLT_STRING (object_path),
+                   DLT_STRING ("error message"), DLT_STRING (error->message));
           g_error_free (error);
 
           /* report the error back to the caller */
@@ -322,11 +322,11 @@ nsm_consumer_service_handle_register_shutdown_client (NSMConsumer           *obj
 
       /* log the registered shutdown client */
       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),
-               DLT_STRING (", shutdown mode "), DLT_UINT (shutdown_mode),
-               DLT_STRING (", timeout "), DLT_UINT (timeout));
+               DLT_STRING ("Shutdown client registered:"),
+               DLT_STRING ("bus name"), DLT_STRING (bus_name),
+               DLT_STRING ("object path"), DLT_STRING (object_path),
+               DLT_STRING ("shutdown mode"), DLT_UINT (shutdown_mode),
+               DLT_STRING ("timeout"), DLT_UINT (timeout));
 
       /* release the consumer proxy; the client owns it now */
       g_object_unref (consumer);
@@ -392,9 +392,9 @@ nsm_consumer_service_handle_unregister_shutdown_client (NSMConsumer           *o
         {
           /* log the unregistration now */
           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));
+                   DLT_STRING ("Shutdown client unregistered:"),
+                   DLT_STRING ("bus name"), DLT_STRING (bus_name),
+                   DLT_STRING ("object path"), DLT_STRING (object_path));
 
           /* remove the client from the list of registered clients */
           service->shutdown_clients = g_list_remove (service->shutdown_clients,
@@ -431,9 +431,9 @@ nsm_consumer_service_handle_lifecycle_request_complete (NSMConsumer           *o
   g_return_val_if_fail (NSM_CONSUMER_IS_SERVICE (service), FALSE);
 
   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));
+           DLT_STRING ("Finished shutting down client:"),
+           DLT_STRING ("request id"), DLT_UINT (request_id),
+           DLT_STRING ("status"), DLT_UINT (status));
 
   nsm_consumer_complete_lifecycle_request_complete (object, invocation,
                                                     NSM_ERROR_STATUS_OK);
@@ -464,9 +464,9 @@ nsm_consumer_service_handle_lifecycle_request_complete (NSMConsumer           *o
             {
               /* no we haven't; log this as a warning */
               DLT_LOG (nsm_dummy_context, DLT_LOG_WARN,
-                       DLT_STRING ("Waiting for lifecycle request "),
+                       DLT_STRING ("Waiting for lifecycle request"),
                        DLT_UINT (service->shutdown_queue->timeout_request),
-                       DLT_STRING (" to be completed but received completion of "),
+                       DLT_STRING ("to be completed but received completion of"),
                        DLT_UINT (request_id),
                        DLT_STRING ("instead "));
             }
@@ -476,8 +476,8 @@ nsm_consumer_service_handle_lifecycle_request_complete (NSMConsumer           *o
           /* the timeout is no longer active, we might have missed
            * the time window; log this now */
           DLT_LOG (nsm_dummy_context, DLT_LOG_WARN,
-                   DLT_STRING ("Lifecycle request "), DLT_UINT (request_id),
-                   DLT_STRING (" completed too late"));
+                   DLT_STRING ("Lifecycle request"), DLT_UINT (request_id),
+                   DLT_STRING ("completed too late"));
         }
     }
 
@@ -546,16 +546,16 @@ nsm_consumer_service_shut_down_next_client_in_queue (NSMConsumerService *service
        & service->shutdown_queue->current_mode) != 0)
     {
       DLT_LOG (nsm_dummy_context, DLT_LOG_INFO,
-               DLT_STRING ("Shutting down a client: "),
-               DLT_STRING ("bus name "),
+               DLT_STRING ("Shutting down a client:"),
+               DLT_STRING ("bus name"),
                DLT_STRING (shutdown_client_get_bus_name (client)),
-               DLT_STRING (", object path "),
+               DLT_STRING ("object path"),
                DLT_STRING (shutdown_client_get_object_path (client)),
-               DLT_STRING (", shutdown mode "),
+               DLT_STRING ("shutdown mode"),
                DLT_UINT (shutdown_client_get_shutdown_mode (client)),
-               DLT_STRING (", timeout "),
+               DLT_STRING ("timeout"),
                DLT_UINT (shutdown_client_get_timeout (client)),
-               DLT_STRING (", request id "),
+               DLT_STRING ("request id"),
                DLT_UINT (GPOINTER_TO_UINT (client)));
 
       /* get the consumer associated with the shutdown client */
@@ -572,9 +572,9 @@ nsm_consumer_service_shut_down_next_client_in_queue (NSMConsumerService *service
   else
     {
       DLT_LOG (nsm_dummy_context, DLT_LOG_INFO,
-               DLT_STRING ("Skipping client "),
+               DLT_STRING ("Skipping client"),
                DLT_STRING (shutdown_client_get_object_path (client)),
-               DLT_STRING (": it is not registered for shutdown mode "),
+               DLT_STRING ("as it is not registered for shutdown mode"),
                DLT_UINT (service->shutdown_queue->current_mode));
 
       /* it isn't, so remove it from the queue */
@@ -613,9 +613,10 @@ nsm_consumer_service_lifecycle_request_finish (GObject      *object,
     {
       /* log the error */
       DLT_LOG (nsm_dummy_context, DLT_LOG_ERROR,
-               DLT_STRING ("Failed to shut down client "),
+               DLT_STRING ("Failed to shut down a client:"),
+               DLT_STRING ("object path"),
                DLT_STRING (shutdown_client_get_object_path (client)),
-               DLT_STRING (""), DLT_STRING (error->message));
+               DLT_STRING ("error message"), DLT_STRING (error->message));
       g_clear_error (&error);
 
       /* remove the client it from the shutdown queue */
@@ -630,12 +631,12 @@ nsm_consumer_service_lifecycle_request_finish (GObject      *object,
     {
       /* log the successful shutdown */
       DLT_LOG (nsm_dummy_context, DLT_LOG_INFO,
-               DLT_STRING ("Successfully shut down client: "),
-               DLT_STRING ("bus name "),
+               DLT_STRING ("Successfully shut down a client:"),
+               DLT_STRING ("bus name"),
                DLT_STRING (shutdown_client_get_bus_name (client)),
-               DLT_STRING (", object path "),
+               DLT_STRING ("object path"),
                DLT_STRING (shutdown_client_get_object_path (client)),
-               DLT_STRING (", shutdown mode "),
+               DLT_STRING ("shutdown mode"),
                DLT_UINT (service->shutdown_queue->current_mode));
 
       /* remove the client it from the shutdown queue */
@@ -650,14 +651,14 @@ nsm_consumer_service_lifecycle_request_finish (GObject      *object,
     {
       /* log that we are waiting for the client to finish its shutdown */
       DLT_LOG (nsm_dummy_context, DLT_LOG_INFO,
-               DLT_STRING ("Waiting for client to shut down: "),
-               DLT_STRING ("request id "),
+               DLT_STRING ("Waiting for client to shut down:"),
+               DLT_STRING ("request id"),
                DLT_UINT (GPOINTER_TO_UINT (client)),
-               DLT_STRING (", bus name "),
+               DLT_STRING ("bus name"),
                DLT_STRING (shutdown_client_get_bus_name (client)),
-               DLT_STRING (", object path "),
+               DLT_STRING ("object path"),
                DLT_STRING (shutdown_client_get_object_path (client)),
-               DLT_STRING (", shutdown mode "),
+               DLT_STRING ("shutdown mode"),
                DLT_UINT (service->shutdown_queue->current_mode));
 
       /* start a timeout to wait for LifecycleComplete to be called by the
@@ -675,16 +676,16 @@ nsm_consumer_service_lifecycle_request_finish (GObject      *object,
     {
       /* log that shutting down this client failed */
       DLT_LOG (nsm_dummy_context, DLT_LOG_ERROR,
-               DLT_STRING ("Failed shutting down a client: "),
-               DLT_STRING ("request id "),
+               DLT_STRING ("Failed shutting down a client:"),
+               DLT_STRING ("request id"),
                DLT_UINT (GPOINTER_TO_UINT (client)),
-               DLT_STRING (", bus name "),
+               DLT_STRING ("bus name"),
                DLT_STRING (shutdown_client_get_bus_name (client)),
-               DLT_STRING (", object path "),
+               DLT_STRING ("object path"),
                DLT_STRING (shutdown_client_get_object_path (client)),
-               DLT_STRING (", shutdown mode "),
+               DLT_STRING ("shutdown mode"),
                DLT_UINT (service->shutdown_queue->current_mode),
-               DLT_STRING (", error status "),
+               DLT_STRING ("error status"),
                DLT_UINT (error_code));
 
       /* remove the client it from the shutdown queue */
@@ -725,16 +726,16 @@ nsm_consumer_service_shut_down_client_timeout (gpointer user_data)
   if (service->shutdown_queue->timeout_request == GPOINTER_TO_UINT (client))
     {
       DLT_LOG (nsm_dummy_context, DLT_LOG_WARN,
-               DLT_STRING ("Received timeout while shutting down a client: "),
-               DLT_STRING ("bus name "),
+               DLT_STRING ("Received timeout while shutting down a client:"),
+               DLT_STRING ("bus name"),
                DLT_STRING (shutdown_client_get_bus_name (client)),
-               DLT_STRING (", object path "),
+               DLT_STRING ("object path"),
                DLT_STRING (shutdown_client_get_object_path (client)),
-               DLT_STRING (", shutdown mode "),
+               DLT_STRING ("shutdown mode"),
                DLT_UINT (shutdown_client_get_shutdown_mode (client)),
-               DLT_STRING (", timeout "),
+               DLT_STRING ("timeout"),
                DLT_UINT (shutdown_client_get_timeout (client)),
-               DLT_STRING (", request id "),
+               DLT_STRING ("request id"),
                DLT_UINT (service->shutdown_queue->timeout_request));
 
       /* it is, so we haven't receive da reply in time; drop the
index fccc13c..55e90fb 100644 (file)
@@ -173,8 +173,8 @@ nsm_dummy_application_init (NSMDummyApplication *application)
 
       /* log information about the watchdog timeout using DLT */
       DLT_LOG (nsm_dummy_context, DLT_LOG_INFO,
-               DLT_STRING ("Updating the systemd watchdog timestamp every "),
-               DLT_UINT (watchdog_sec), DLT_STRING (" seconds"));
+               DLT_STRING ("Updating the systemd watchdog timestamp every"),
+               DLT_UINT (watchdog_sec), DLT_STRING ("seconds"));
     }
 
   /* install the signal handler */
index 9f918bf..64dfb33 100644 (file)
@@ -202,8 +202,8 @@ nsm_lifecycle_control_service_handle_set_node_state (NSMLifecycleControl
     {
       /* log how we handled the node state */
       DLT_LOG (nsm_dummy_context, DLT_LOG_INFO,
-               DLT_STRING ("Node state "), DLT_INT (node_state_id),
-               DLT_STRING (" applied: "),
+               DLT_STRING ("Node state"), DLT_INT (node_state_id),
+               DLT_STRING ("applied:"),
                DLT_STRING (service->accept_state ? "yes" : "no"));
 
       /* alternate return value between successful(0) and fail(-1) with every handled call.
@@ -218,7 +218,7 @@ nsm_lifecycle_control_service_handle_set_node_state (NSMLifecycleControl
     {
       /* log how we handled the node state */
       DLT_LOG (nsm_dummy_context, DLT_LOG_INFO,
-               DLT_STRING ("Received an invalid node state: "), DLT_INT (node_state_id));
+               DLT_STRING ("Received an invalid node state:"), DLT_INT (node_state_id));
 
       /* let the caller know that it sent an invalid parameter */
       error_code = NSM_ERROR_STATUS_PARAMETER;