diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-05-15 17:25:08 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-05-15 17:25:08 +0200 |
commit | 843d2643849a1ec63034012c8fe50bfaad23190b (patch) | |
tree | c073b19d9eb4a164b41c70e60fdcbd2d5e9b9bbf /log.h | |
parent | d9a76d8f860c4ee19c4aa0df685889d058f4c5cb (diff) |
log: rework logging logic so that we don't keep /dev/console open
Diffstat (limited to 'log.h')
-rw-r--r-- | log.h | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -26,10 +26,13 @@ #include "macro.h" +/* If set to SYSLOG and /dev/log can not be opened we fall back to + * KSMG. If KMSG fails, we fall back to CONSOLE */ typedef enum LogTarget{ LOG_TARGET_CONSOLE, - LOG_TARGET_SYSLOG, LOG_TARGET_KMSG, + LOG_TARGET_SYSLOG, + LOG_TARGET_SYSLOG_OR_KMSG, _LOG_TARGET_MAX, _LOG_TARGET_INVALID = -1 } LogTarget; @@ -43,14 +46,15 @@ int log_set_max_level_from_string(const char *e); LogTarget log_get_target(void); int log_get_max_level(void); -void log_close_kmsg(void); -int log_open_kmsg(void); +int log_open(void); + void log_close_syslog(void); -int log_open_syslog(void); +void log_close_kmsg(void); +void log_close_console(void); void log_parse_environment(void); -void log_meta( +int log_meta( int level, const char*file, int line, |