launch: simplify logging
Always log on error, and any other logging only in verbose mode.
This also drops some logging that was only useful for debugging.
@@ -455,7 +455,6 @@ static int manager_start_unit_handler(sd_bus_message *message, void *userdata, s
/* unit started successfully */
return 1;
- if (main_arg_verbose)
fprintf(stderr, "Activation request for '%s' failed: %s\n", service->name, error->message);
/* unit failed, so reset pending activation requsets in the broker */
@@ -483,9 +482,6 @@ static int manager_start_unit(Manager *manager, Service *service) {
service->slot = sd_bus_slot_unref(service->slot);
- if (main_arg_verbose)
- fprintf(stderr, "Activation request for '%s' -> '%s'\n", service->name, service->unit);
-
r = sd_bus_message_new_method_call(manager->bus_regular, &method_call,
"org.freedesktop.systemd1",
"/org/freedesktop/systemd1",
@@ -512,9 +508,6 @@ static int manager_start_transient_unit(Manager *manager, Service *service) {
service->slot = sd_bus_slot_unref(service->slot);
- if (main_arg_verbose)
- fprintf(stderr, "Activation request for '%s'\n", service->name);
-
r = asprintf(&unit, "dbus-%s@%"PRIu64".service", service->name, service->instance++);
if (r < 0)
return error_origin(-errno);
@@ -741,7 +734,6 @@ static int manager_set_environment_handler(sd_bus_message *message, void *userda
/* environment set successfully */
return 1;
- if (main_arg_verbose)
fprintf(stderr, "Updating activation environment failed: %s\n", error->message);
return 1;
@@ -838,9 +830,6 @@ static int manager_load_service_file(Manager *manager, const char *path, NSSCach
* hurt much either. If anyone cares, feel free to provide `c-ini'.
*/
- if (main_arg_verbose)
- fprintf(stderr, "Loading service '%s'\n", path);
-
f = g_key_file_new();
if (!g_key_file_load_from_file(f, path, G_KEY_FILE_NONE, NULL)) {
@@ -1550,9 +1539,6 @@ static int run(void) {
r = unlink(unlink_path);
if (r < 0)
return error_origin(-errno);
-
- if (main_arg_verbose)
- fprintf(stderr, "Cleaned up listener socket '%s'\n", unlink_path);
}
return r;
