X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fcore%2Fexecute.c;h=ab508b16186dcc9b036591c8bcb2392296ef6c30;hp=5083af9aedec5b4011b55a3f6fbe7900d69b21cd;hb=03bb799e0b3560dca8c9b70de3dbadb0c281b36f;hpb=432c30d25fc2a7b4939d5ea6c29708e1323a2b9c diff --git a/src/core/execute.c b/src/core/execute.c index 5083af9ae..ab508b161 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -1516,6 +1516,20 @@ int exec_spawn(ExecCommand *command, final_env = strv_env_clean(final_env); + if (_unlikely_(log_get_max_level() >= LOG_PRI(LOG_DEBUG))) { + line = exec_command_line(final_argv); + if (line) { + log_open(); + log_struct_unit(LOG_DEBUG, + unit_id, + "EXECUTABLE=%s", command->path, + "MESSAGE=Executing: %s", + line, NULL); + log_close(); + free(line); + line = NULL; + } + } execve(command->path, final_argv, final_env); err = -errno; r = EXIT_EXEC;