X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fmain.c;h=91516dad5afccdcfe900ba1c0793a59fb9653a7e;hb=6ef25fb65ee0a62972ed7cbc01b6a11feb5fcb16;hp=bfc48e5e39a35c4b81abadc4e455b72b83c8bd7e;hpb=27d340c772fb1b251085dba7bd5420484f7c5892;p=elogind.git diff --git a/src/main.c b/src/main.c index bfc48e5e3..91516dad5 100644 --- a/src/main.c +++ b/src/main.c @@ -52,6 +52,7 @@ #include "build.h" #include "strv.h" #include "def.h" +#include "virt.h" static enum { ACTION_RUN, @@ -76,7 +77,7 @@ static bool arg_mount_auto = true; static bool arg_swap_auto = true; static char **arg_default_controllers = NULL; static char ***arg_join_controllers = NULL; -static ExecOutput arg_default_std_output = EXEC_OUTPUT_SYSLOG; +static ExecOutput arg_default_std_output = EXEC_OUTPUT_JOURNAL; static ExecOutput arg_default_std_error = EXEC_OUTPUT_INHERIT; static FILE* serialization = NULL; @@ -269,7 +270,7 @@ static int parse_proc_cmdline_word(const char *word) { int r; if ((r = parse_boolean(word + 18)) < 0) - log_warning("Failed to parse dump core switch %s, Ignoring.", word + 18); + log_warning("Failed to parse dump core switch %s. Ignoring.", word + 18); else arg_dump_core = r; @@ -277,7 +278,7 @@ static int parse_proc_cmdline_word(const char *word) { int r; if ((r = parse_boolean(word + 20)) < 0) - log_warning("Failed to parse crash shell switch %s, Ignoring.", word + 20); + log_warning("Failed to parse crash shell switch %s. Ignoring.", word + 20); else arg_crash_shell = r; @@ -285,7 +286,7 @@ static int parse_proc_cmdline_word(const char *word) { int r; if ((r = parse_boolean(word + 22)) < 0) - log_warning("Failed to parse confirm spawn switch %s, Ignoring.", word + 22); + log_warning("Failed to parse confirm spawn switch %s. Ignoring.", word + 22); else arg_confirm_spawn = r; @@ -293,7 +294,7 @@ static int parse_proc_cmdline_word(const char *word) { int k; if (safe_atoi(word + 19, &k) < 0) - log_warning("Failed to parse crash chvt switch %s, Ignoring.", word + 19); + log_warning("Failed to parse crash chvt switch %s. Ignoring.", word + 19); else arg_crash_chvt = k; @@ -301,21 +302,21 @@ static int parse_proc_cmdline_word(const char *word) { int r; if ((r = parse_boolean(word + 20)) < 0) - log_warning("Failed to parse show status switch %s, Ignoring.", word + 20); + log_warning("Failed to parse show status switch %s. Ignoring.", word + 20); else arg_show_status = r; } else if (startswith(word, "systemd.default_standard_output=")) { int r; if ((r = exec_output_from_string(word + 32)) < 0) - log_warning("Failed to parse default standard output switch %s, Ignoring.", word + 32); + log_warning("Failed to parse default standard output switch %s. Ignoring.", word + 32); else arg_default_std_output = r; } else if (startswith(word, "systemd.default_standard_error=")) { int r; if ((r = exec_output_from_string(word + 31)) < 0) - log_warning("Failed to parse default standard error switch %s, Ignoring.", word + 31); + log_warning("Failed to parse default standard error switch %s. Ignoring.", word + 31); else arg_default_std_error = r; #ifdef HAVE_SYSV_COMPAT @@ -323,7 +324,7 @@ static int parse_proc_cmdline_word(const char *word) { int r; if ((r = parse_boolean(word + 21)) < 0) - log_warning("Failed to parse SysV console switch %s, Ignoring.", word + 20); + log_warning("Failed to parse SysV console switch %s. Ignoring.", word + 20); else arg_sysv_console = r; #endif @@ -342,14 +343,14 @@ static int parse_proc_cmdline_word(const char *word) { #ifdef HAVE_SYSV_COMPAT "systemd.sysv_console=0|1 Connect output of SysV scripts to console\n" #endif - "systemd.log_target=console|kmsg|syslog|syslog-or-kmsg|null\n" + "systemd.log_target=console|kmsg|journal|journal-or-kmsg|syslog|syslog-or-kmsg|null\n" " Log target\n" "systemd.log_level=LEVEL Log level\n" "systemd.log_color=0|1 Highlight important log messages\n" "systemd.log_location=0|1 Include code location in log messages\n" - "systemd.default_standard_output=null|tty|syslog|syslog+console|kmsg|kmsg+console\n" + "systemd.default_standard_output=null|tty|syslog|syslog+console|kmsg|kmsg+console|journal|journal+console\n" " Set default log output for services\n" - "systemd.default_standard_error=null|tty|syslog|syslog+console|kmsg|kmsg+console\n" + "systemd.default_standard_error=null|tty|syslog|syslog+console|kmsg|kmsg+console|journal|journal+console\n" " Set default log error output for services\n"); } else if (streq(word, "quiet")) { @@ -992,7 +993,7 @@ static int help(void) { #ifdef HAVE_SYSV_COMPAT " --sysv-console[=0|1] Connect output of SysV scripts to console\n" #endif - " --log-target=TARGET Set log target (console, syslog, kmsg, syslog-or-kmsg, null)\n" + " --log-target=TARGET Set log target (console, journal, syslog, kmsg, journal-or-kmsg, syslog-or-kmsg, null)\n" " --log-level=LEVEL Set log level (debug, info, notice, warning, err, crit, alert, emerg)\n" " --log-color[=0|1] Highlight important log messages\n" " --log-location[=0|1] Include code location in log messages\n" @@ -1176,7 +1177,7 @@ int main(int argc, char *argv[]) { if (getpid() == 1) { arg_running_as = MANAGER_SYSTEM; - log_set_target(detect_container(NULL) > 0 ? LOG_TARGET_CONSOLE : LOG_TARGET_SYSLOG_OR_KMSG); + log_set_target(detect_container(NULL) > 0 ? LOG_TARGET_CONSOLE : LOG_TARGET_JOURNAL_OR_KMSG); if (!is_reexec) if (selinux_setup(&loaded_policy) < 0)