From: Sven Eden Date: Wed, 28 Jun 2017 16:56:23 +0000 (+0200) Subject: Prep v231.2: Make sure logs go to syslog or kmsg if elogind was started in debug... X-Git-Tag: v231.3~8 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=81c8750d075cba1ffd20cbd4ef18d9078b0d9f08 Prep v231.2: Make sure logs go to syslog or kmsg if elogind was started in debug mode, even if it was started from a tty. --- diff --git a/src/login/logind.c b/src/login/logind.c index 77a11bbfe..dab6e7f44 100644 --- a/src/login/logind.c +++ b/src/login/logind.c @@ -1209,12 +1209,15 @@ int main(int argc, char *argv[]) { log_set_target(LOG_TARGET_AUTO); log_set_facility(LOG_AUTH); log_parse_environment(); - log_open(); #ifdef ENABLE_DEBUG_ELOGIND log_set_max_level(LOG_DEBUG); + log_set_target(LOG_TARGET_SYSLOG_OR_KMSG); #endif // ENABLE_DEBUG_ELOGIND + log_open(); + + umask(0022); if (argc != 1) {