summaryrefslogtreecommitdiff
path: root/src/basic/log.h
diff options
context:
space:
mode:
authorAlan Jenkins <alan.christopher.jenkins@gmail.com>2018-01-26 13:42:53 +0000
committerAlan Jenkins <alan.christopher.jenkins@gmail.com>2018-01-27 18:01:51 +0000
commitcc2b9e6b20d71c60540f54646c3ec87cf57b0400 (patch)
treedf74fb36626e6ba810f611fba06a86ef1e99fb83 /src/basic/log.h
parentba307538994fb688284a13bb215267c3312bb5c7 (diff)
downloadsystemd-cc2b9e6b20d71c60540f54646c3ec87cf57b0400.tar.gz
rationalize interface for opening/closing logging
log_open_console() did not switch from stderr to /dev/console, when "always_reopen_console" was set. It was necessary to call log_close_console() first. By contrast, log_open() did switch between e.g. journald and kmsg according to the value of "prohibit_ipc". Let's fix log_open() to respect the values of all the log options, and we can make log_close_*() private. Also log_close_console() is changed. There was some precaution, avoiding closing the console fd if we are not PID 1. I think commit 48a601fe made a little mistake in leaving this in, and it only served to confuse readers :). Also I changed systemd-shutdown. Now we have log_set_prohibit_ipc(), let's use it to clarify that systemd-shutdown is not expected to try and log via journald (which it is about to kill). We avoided ever asking it to, but it's more convenient for the reader if they don't have to think about that. In that sense, it's similar to using assert() to validate a function's arguments.
Diffstat (limited to 'src/basic/log.h')
-rw-r--r--src/basic/log.h5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/basic/log.h b/src/basic/log.h
index f2c6cd8c0a..5b5a25bd6d 100644
--- a/src/basic/log.h
+++ b/src/basic/log.h
@@ -94,11 +94,6 @@ int log_open(void);
void log_close(void);
void log_forget_fds(void);
-void log_close_syslog(void);
-void log_close_journal(void);
-void log_close_kmsg(void);
-void log_close_console(void);
-
void log_parse_environment_realm(LogRealm realm);
#define log_parse_environment() \
log_parse_environment_realm(LOG_REALM)