From 77f9be38d7469eefb0fac3adf43261b4d84315d2 Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Sat, 20 Jun 2020 14:55:54 +0200 Subject: Make logging messages consistent in adding a newline for all messages --- systemd.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'systemd.c') diff --git a/systemd.c b/systemd.c index 21268b7..a592d3a 100644 --- a/systemd.c +++ b/systemd.c @@ -37,7 +37,7 @@ systemd_service_object_path(struct cfg *cfg, const char *service) const char *s; if (empty_str(service)) { - error("invalid arguments\n"); + error("invalid arguments"); return NULL; } @@ -86,7 +86,7 @@ get_bus(struct cfg *cfg) if (!cfg->sd_bus) { r = sd_bus_open_user(&cfg->sd_bus); if (r < 0) { - error("failed to connect to user system bus: %s\n", strerror(-r)); + error("failed to connect to user system bus: %s", strerror(-r)); cfg->sd_bus_failed = true; return NULL; } @@ -126,17 +126,17 @@ systemd_service_running(struct cfg *cfg, struct server *server) &error, &status); if (r < 0) { - error("failed to get status for service %s (%s): %s\n", + error("failed to get status for service %s (%s): %s", server->systemd_service, server->systemd_obj, error.message); goto out; } if (!strcmp(status, "active")) { running = true; - debug(DBG_SYSD, "systemd service %s (%s) is active\n", + debug(DBG_SYSD, "systemd service %s (%s) is active", server->systemd_service, server->systemd_obj); } else - debug(DBG_SYSD, "systemd service %s (%s) is not active\n", + debug(DBG_SYSD, "systemd service %s (%s) is not active", server->systemd_service, server->systemd_obj); out: @@ -168,18 +168,18 @@ systemd_service_action(struct cfg *cfg, struct server *server, const char *actio "s", "fail"); if (r < 0) { - error("failed to perform action %s on systemd service %s: %s\n", + error("failed to perform action %s on systemd service %s: %s", action, server->systemd_service, error.message); goto out; } r = sd_bus_message_read(m, "o", &path); if (r < 0) { - error("failed to parse response message: %s\n", strerror(-r)); + error("failed to parse response message: %s", strerror(-r)); goto out; } - verbose("action %s queued for service %s\n", + verbose("action %s queued for service %s", action, server->systemd_service); performed = true; -- cgit v1.2.3