]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: use correct level for CPU time log message
authorChristian Göttsche <cgzones@googlemail.com>
Mon, 6 Dec 2021 15:57:42 +0000 (16:57 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 6 Dec 2021 19:55:22 +0000 (20:55 +0100)
raise_level() takes the info condition as second argument and the notice
one as third. For the consumed CPU time these conditions are swapped.

Fixes: 37109b856aeb ("pid1: use LOG_DEBUG/INFO/NOTICE for unit resource consumption message")
src/core/unit.c

index e4f8bac442b8020d060e03fd8085cc9fcd0c1ca2..a599e393a8c0602c4e0c337892ced43a93fe6b2b 100644 (file)
@@ -2304,8 +2304,8 @@ static int unit_log_resources(Unit *u) {
                 message_parts[n_message_parts++] = t;
 
                 log_level = raise_level(log_level,
-                                        nsec > NOTICEWORTHY_CPU_NSEC,
-                                        nsec > MENTIONWORTHY_CPU_NSEC);
+                                        nsec > MENTIONWORTHY_CPU_NSEC,
+                                        nsec > NOTICEWORTHY_CPU_NSEC);
         }
 
         for (CGroupIOAccountingMetric k = 0; k < _CGROUP_IO_ACCOUNTING_METRIC_MAX; k++) {