]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
condition: downgrade a few log messages to debug
authorLennart Poettering <lennart@poettering.net>
Thu, 14 May 2020 07:27:04 +0000 (09:27 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 18 May 2020 18:17:57 +0000 (20:17 +0200)
Condition checks shouldn't log loudly, since they run all the time.
Let's make things debuggable, by keeping the messages in LOG_DEBUG in,
but don't make more noise than necessary.

src/shared/condition.c

index 45f36781a025b3193bfd8f2c3f2be34d71a76b80..4784c7db7de7cbc288e631c407aacf40e3a602a5 100644 (file)
@@ -601,16 +601,16 @@ static int condition_test_needs_update(Condition *c, char **env) {
 
                 r = parse_env_file(NULL, p, "TIMESTAMP_NSEC", &timestamp_str);
                 if (r < 0) {
-                        log_error_errno(r, "Failed to parse timestamp file '%s', using mtime: %m", p);
+                        log_debug_errno(r, "Failed to parse timestamp file '%s', using mtime: %m", p);
                         return true;
                 } else if (r == 0) {
-                        log_debug("No data in timestamp file '%s', using mtime", p);
+                        log_debug("No data in timestamp file '%s', using mtime.", p);
                         return true;
                 }
 
                 r = safe_atou64(timestamp_str, &timestamp);
                 if (r < 0) {
-                        log_error_errno(r, "Failed to parse timestamp value '%s' in file '%s', using mtime: %m", timestamp_str, p);
+                        log_debug_errno(r, "Failed to parse timestamp value '%s' in file '%s', using mtime: %m", timestamp_str, p);
                         return true;
                 }