]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: use LOG_UNIT_MESSAGE() where appropriate
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 11 May 2022 05:40:29 +0000 (07:40 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 11 May 2022 14:47:40 +0000 (16:47 +0200)
src/core/transaction.c

index 7bb8dfb0f4c6c8ad3e6c6b25befd399c5b437897..bafbb80b47d1d4edb7989940eb925e0c2a9d8495 100644 (file)
@@ -390,19 +390,20 @@ static int transaction_verify_order_one(Transaction *tr, Job *j, Job *from, unsi
                 STRV_FOREACH_PAIR(unit_id, job_type, array)
                         /* logging for j not k here to provide a consistent narrative */
                         log_struct(LOG_WARNING,
-                                   "MESSAGE=%s: Found %s on %s/%s",
-                                   j->unit->id,
-                                   unit_id == array ? "ordering cycle" : "dependency",
-                                   *unit_id, *job_type,
+                                   LOG_UNIT_MESSAGE(j->unit,
+                                                    "Found %s on %s/%s",
+                                                    unit_id == array ? "ordering cycle" : "dependency",
+                                                    *unit_id, *job_type),
                                    "%s", unit_ids);
 
                 if (delete) {
                         const char *status;
                         /* logging for j not k here to provide a consistent narrative */
                         log_struct(LOG_ERR,
-                                   "MESSAGE=%s: Job %s/%s deleted to break ordering cycle starting with %s/%s",
-                                   j->unit->id, delete->unit->id, job_type_to_string(delete->type),
-                                   j->unit->id, job_type_to_string(j->type),
+                                   LOG_UNIT_MESSAGE(j->unit,
+                                                    "Job %s/%s deleted to break ordering cycle starting with %s/%s",
+                                                    delete->unit->id, job_type_to_string(delete->type),
+                                                    j->unit->id, job_type_to_string(j->type)),
                                    "%s", unit_ids);
 
                         if (log_get_show_color())
@@ -420,8 +421,8 @@ static int transaction_verify_order_one(Transaction *tr, Job *j, Job *from, unsi
                 }
 
                 log_struct(LOG_ERR,
-                           "MESSAGE=%s: Unable to break cycle starting with %s/%s",
-                           j->unit->id, j->unit->id, job_type_to_string(j->type),
+                           LOG_UNIT_MESSAGE(j->unit, "Unable to break cycle starting with %s/%s",
+                                            j->unit->id, job_type_to_string(j->type)),
                            "%s", unit_ids);
 
                 return sd_bus_error_setf(e, BUS_ERROR_TRANSACTION_ORDER_IS_CYCLIC,