]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: change ordering cycle log message log levels
authorLennart Poettering <lennart@poettering.net>
Wed, 18 Jun 2025 09:48:39 +0000 (11:48 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 23 Jun 2025 14:47:06 +0000 (16:47 +0200)
Let's downgrade the log message about our attempts to deal with an
ordering cycle to warning, because this is a "positive" thing, we try to
improve an earlier error.

OTOH increase the log level when we first log about the cycle to error,
since that highlights the actual problem.

src/core/transaction.c

index 8962bf94616685821b298620b8b76ad3c7afdd81..88ff455a015d36e7ef494d046cde67785c87a799 100644 (file)
@@ -411,7 +411,7 @@ static int transaction_verify_order_one(Transaction *tr, Job *j, Job *from, unsi
 
                 /* logging for j not k here to provide a consistent narrative */
                 if (cycle_path_text)
-                        log_struct(LOG_WARNING,
+                        log_struct(LOG_ERR,
                                    LOG_UNIT_MESSAGE(j->unit, "%s", cycle_path_text),
                                    LOG_MESSAGE_ID(SD_MESSAGE_UNIT_ORDERING_CYCLE_STR),
                                    LOG_ITEM("%s", strna(unit_ids)));
@@ -419,7 +419,7 @@ static int transaction_verify_order_one(Transaction *tr, Job *j, Job *from, unsi
                 if (delete) {
                         const char *status;
                         /* logging for j not k here to provide a consistent narrative */
-                        log_struct(LOG_ERR,
+                        log_struct(LOG_WARNING,
                                    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),