diff options
Diffstat (limited to 'src/core/snapshot.c')
-rw-r--r-- | src/core/snapshot.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/core/snapshot.c b/src/core/snapshot.c index 2c00680f16..1e634b9bc1 100644 --- a/src/core/snapshot.c +++ b/src/core/snapshot.c @@ -51,11 +51,7 @@ static void snapshot_set_state(Snapshot *s, SnapshotState state) { s->state = state; if (state != old_state) - log_unit_debug(UNIT(s)->id, - "%s changed %s -> %s", - UNIT(s)->id, - snapshot_state_to_string(old_state), - snapshot_state_to_string(state)); + log_unit_debug(UNIT(s), "Changed %s -> %s", snapshot_state_to_string(old_state), snapshot_state_to_string(state)); unit_notify(UNIT(s), state_translation_table[old_state], state_translation_table[state], true); } @@ -155,7 +151,7 @@ static int snapshot_deserialize_item(Unit *u, const char *key, const char *value state = snapshot_state_from_string(value); if (state < 0) - log_unit_debug(u->id, "Failed to parse state value %s", value); + log_unit_debug(u, "Failed to parse state value: %s", value); else s->deserialized_state = state; @@ -163,7 +159,7 @@ static int snapshot_deserialize_item(Unit *u, const char *key, const char *value r = parse_boolean(value); if (r < 0) - log_unit_debug(u->id, "Failed to parse cleanup value %s", value); + log_unit_debug(u, "Failed to parse cleanup value: %s", value); else s->cleanup = r; @@ -173,7 +169,7 @@ static int snapshot_deserialize_item(Unit *u, const char *key, const char *value if (r < 0) return r; } else - log_unit_debug(u->id, "Unknown serialization key '%s'", key); + log_unit_debug(u, "Unknown serialization key: %s", key); return 0; } @@ -258,7 +254,7 @@ int snapshot_create(Manager *m, const char *name, bool cleanup, sd_bus_error *e, SNAPSHOT(u)->cleanup = cleanup; *_s = SNAPSHOT(u); - log_unit_info(u->id, "Created snapshot %s.", u->id); + log_unit_info(u, "Created snapshot."); return 0; @@ -272,7 +268,7 @@ fail: void snapshot_remove(Snapshot *s) { assert(s); - log_unit_info(UNIT(s)->id, "Removing snapshot %s.", UNIT(s)->id); + log_unit_info(UNIT(s), "Removing snapshot."); unit_add_to_cleanup_queue(UNIT(s)); } |