int log_open(void) {
int r;
+ /* Do not call from library code. */
+
/* If we don't use the console we close it here, to not get
* killed by SAK. If we don't use syslog we close it here so
* that we are not confused by somebody deleting the socket in
}
void log_close(void) {
+ /* Do not call from library code. */
+
log_close_journal();
log_close_syslog();
log_close_kmsg();
}
void log_forget_fds(void) {
+ /* Do not call from library code. */
+
console_fd = kmsg_fd = syslog_fd = journal_fd = -1;
}
}
void log_parse_environment_realm(LogRealm realm) {
+ /* Do not call from library code. */
+
const char *e;
if (get_ctty_devnr(0, NULL) < 0)
#define log_get_max_level() \
log_get_max_level_realm(LOG_REALM)
+/* Functions below that open and close logs or configure logging based on the
+ * environment should not be called from library code — this is always a job
+ * for the application itself.
+ */
+
int log_open(void);
void log_close(void);
void log_forget_fds(void);