execute: Get rid of custom logging macros
We already have LOG_CONTEXT_PUSH_EXEC() which with two additions does exactly the same as the custom logging macros, so let's get rid of the custom logging macros and use LOG_CONTEXT_PUSH_EXEC() instead.
This commit is contained in:
+7
-5
@@ -240,6 +240,8 @@ static int run(int argc, char *argv[]) {
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to deserialize: %m");
|
||||
|
||||
LOG_CONTEXT_PUSH_EXEC(&context, ¶ms);
|
||||
|
||||
arg_serialization = safe_fclose(arg_serialization);
|
||||
fdset = fdset_free(fdset);
|
||||
|
||||
@@ -253,11 +255,11 @@ static int run(int argc, char *argv[]) {
|
||||
const char *status = ASSERT_PTR(
|
||||
exit_status_to_string(exit_status, EXIT_STATUS_LIBC | EXIT_STATUS_SYSTEMD));
|
||||
|
||||
log_exec_struct_errno(&context, ¶ms, LOG_ERR, r,
|
||||
LOG_MESSAGE_ID(SD_MESSAGE_SPAWN_FAILED_STR),
|
||||
LOG_EXEC_MESSAGE(¶ms, "Failed at step %s spawning %s: %m",
|
||||
status, command.path),
|
||||
LOG_ITEM("EXECUTABLE=%s", command.path));
|
||||
log_struct_errno(LOG_ERR, r,
|
||||
LOG_MESSAGE_ID(SD_MESSAGE_SPAWN_FAILED_STR),
|
||||
LOG_EXEC_MESSAGE(¶ms, "Failed at step %s spawning %s: %m",
|
||||
status, command.path),
|
||||
LOG_ITEM("EXECUTABLE=%s", command.path));
|
||||
} else
|
||||
/* r == 0: 'skip' is chosen in the confirm spawn prompt
|
||||
* r > 0: expected/ignored failure, do not log at error level */
|
||||
|
||||
Reference in New Issue
Block a user