log.c revision b8d0ffc21f9c237cdeef49b1873b47df1a0a1543
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering This file is part of systemd.
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering Copyright 2010 Lennart Poettering
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering systemd is free software; you can redistribute it and/or modify it
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering under the terms of the GNU Lesser General Public License as published by
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering the Free Software Foundation; either version 2.1 of the License, or
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering (at your option) any later version.
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering systemd is distributed in the hope that it will be useful, but
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering WITHOUT ANY WARRANTY; without even the implied warranty of
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering Lesser General Public License for more details.
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering You should have received a copy of the GNU Lesser General Public License
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering along with systemd; If not, see <http://www.gnu.org/licenses/>.
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poetteringstatic LogTarget log_target = LOG_TARGET_CONSOLE;
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poetteringstatic bool syslog_is_stream = false;
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poetteringstatic bool show_color = false;
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poetteringstatic bool show_location = false;
36d9205d669bcdcb04fa730d1f3549a9fc9a9001Tom Gundersen/* Akin to glibc's __abort_msg; which is private and we hence cannot
58db254ade4fb2ef77de68f28c4f13814819f6a1Lennart Poettering * use here. */
58db254ade4fb2ef77de68f28c4f13814819f6a1Lennart Poetteringstatic int log_open_console(void) {
58db254ade4fb2ef77de68f28c4f13814819f6a1Lennart Poettering console_fd = open_terminal("/dev/console", O_WRONLY|O_NOCTTY|O_CLOEXEC);
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poetteringstatic int log_open_kmsg(void) {
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering kmsg_fd = open("/dev/kmsg", O_WRONLY|O_NOCTTY|O_CLOEXEC);
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering fd = socket(AF_UNIX, type|SOCK_CLOEXEC, 0);
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering /* We need a blocking fd here since we'd otherwise lose
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering messages way too early. However, let's not hang forever in the
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering unlikely case of a deadlock. */
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(tv));
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poetteringstatic int log_open_syslog(void) {
1b4f6e79ec51a57003896a0b605fba427b4a98d2Lennart Poettering syslog_fd = create_log_socket(SOCK_DGRAM);
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering if (connect(syslog_fd, &sa.sa, offsetof(struct sockaddr_un, sun_path) + strlen(sa.un.sun_path)) < 0) {
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering /* Some legacy syslog systems still use stream
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering * sockets. They really shouldn't. But what can we
28b9b7640603f88cb49f95609331fa5072715f15Lennart Poettering syslog_fd = create_log_socket(SOCK_STREAM);
28b9b7640603f88cb49f95609331fa5072715f15Lennart Poettering if (connect(syslog_fd, &sa.sa, offsetof(struct sockaddr_un, sun_path) + strlen(sa.un.sun_path)) < 0) {
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poetteringstatic int log_open_journal(void) {
4d247a6cd3f69acbc5a09e8ac7e4fbb50eaa3228Lennart Poettering .un.sun_path = "/run/systemd/journal/socket",
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering journal_fd = create_log_socket(SOCK_DGRAM);
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering if (connect(journal_fd, &sa.sa, offsetof(struct sockaddr_un, sun_path) + strlen(sa.un.sun_path)) < 0) {
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering /* If we don't use the console we close it here, to not get
5d27351f8546530cf779847b0b04b0172c09f9d0Tom Gundersen * killed by SAK. If we don't use syslog we close it here so
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering * that we are not confused by somebody deleting the socket in
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering * the fs. If we don't use /dev/kmsg we still keep it open,
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering * because there is no reason to close it. */
5d27351f8546530cf779847b0b04b0172c09f9d0Tom Gundersen if ((log_target != LOG_TARGET_AUTO && log_target != LOG_TARGET_SAFE) ||
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering log_target == LOG_TARGET_JOURNAL_OR_KMSG ||
5d27351f8546530cf779847b0b04b0172c09f9d0Tom Gundersen if (log_target == LOG_TARGET_SYSLOG_OR_KMSG ||
547973dea7abd6c124ff6c79fe2bbe322a7314aeLennart Poettering log_target == LOG_TARGET_JOURNAL_OR_KMSG ||
547973dea7abd6c124ff6c79fe2bbe322a7314aeLennart Poettering log_target == LOG_TARGET_SYSLOG_OR_KMSG ||
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering console_fd = kmsg_fd = syslog_fd = journal_fd = -1;
6af47493de0ef2b66d4c3fbcdd4a2e12fec4bfbaLennart Poettering const char *buffer) {
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering unsigned n = 0;
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering highlight = LOG_PRI(level) <= LOG_ERR && show_color;
c52a97b896c914e17ba5be73c0e806455fd9ad4dLennart Poettering snprintf(location, sizeof(location), "(%s:%u) ", file, line);
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering IOVEC_SET_STRING(iovec[n++], ANSI_HIGHLIGHT_RED_ON);
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering IOVEC_SET_STRING(iovec[n++], ANSI_HIGHLIGHT_OFF);
ee3d6aff9bd73c1b23e29d1fa1fa6f7a1ef0533bLennart Poettering /* If somebody tried to kick us from our
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering * console tty (via vhangup() or suchlike),
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering * try to reconnect */
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering const char *buffer) {
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering char header_priority[16], header_time[64], header_pid[16];
9c92ce6d67f88beb31dd6555d12ae3f632218a39Lennart Poettering snprintf(header_priority, sizeof(header_priority), "<%i>", level);
9de3e3294065e8697ff10130b53f274319cdcf6fZbigniew Jędrzejewski-Szmek t = (time_t) (now(CLOCK_REALTIME) / USEC_PER_SEC);
9de3e3294065e8697ff10130b53f274319cdcf6fZbigniew Jędrzejewski-Szmek if (strftime(header_time, sizeof(header_time), "%h %e %T ", tm) <= 0)
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering snprintf(header_pid, sizeof(header_pid), "[%lu]: ", (unsigned long) getpid());
9c92ce6d67f88beb31dd6555d12ae3f632218a39Lennart Poettering IOVEC_SET_STRING(iovec[0], header_priority);
9de3e3294065e8697ff10130b53f274319cdcf6fZbigniew Jędrzejewski-Szmek IOVEC_SET_STRING(iovec[1], header_time);
9c92ce6d67f88beb31dd6555d12ae3f632218a39Lennart Poettering IOVEC_SET_STRING(iovec[2], program_invocation_short_name);
9de3e3294065e8697ff10130b53f274319cdcf6fZbigniew Jędrzejewski-Szmek IOVEC_SET_STRING(iovec[4], buffer);
9de3e3294065e8697ff10130b53f274319cdcf6fZbigniew Jędrzejewski-Szmek /* When using syslog via SOCK_STREAM separate the messages by NUL chars */
9de3e3294065e8697ff10130b53f274319cdcf6fZbigniew Jędrzejewski-Szmek n = sendmsg(syslog_fd, &msghdr, MSG_NOSIGNAL);
abf126a355e2f2b62b6c51ab3bb37895d1e3eee7Tom Gundersen (size_t) n >= IOVEC_TOTAL_SIZE(iovec, ELEMENTSOF(iovec)))
42cc2eebb01056beb7acd3ecfe8e533558237f84Lennart Poettering IOVEC_INCREMENT(iovec, ELEMENTSOF(iovec), n);
50f1e641a93cacfc693b0c3d300bee5df0c8c460Tom Gundersen const char *buffer) {
5d45a8808431987c370706d365fb0cc95cf03d52Tom Gundersen snprintf(header_priority, sizeof(header_priority), "<%i>", level);
9de3e3294065e8697ff10130b53f274319cdcf6fZbigniew Jędrzejewski-Szmek snprintf(header_pid, sizeof(header_pid), "[%lu]: ", (unsigned long) getpid());
9de3e3294065e8697ff10130b53f274319cdcf6fZbigniew Jędrzejewski-Szmek IOVEC_SET_STRING(iovec[0], header_priority);
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering IOVEC_SET_STRING(iovec[1], program_invocation_short_name);
9de3e3294065e8697ff10130b53f274319cdcf6fZbigniew Jędrzejewski-Szmek IOVEC_SET_STRING(iovec[2], header_pid);
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering if (writev(kmsg_fd, iovec, ELEMENTSOF(iovec)) < 0)
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poetteringstatic int log_do_header(char *header, size_t size,
623a4c97b9175f95c4b1c6fc34e36c56f1e4ddbfLennart Poettering const char *file, int line, const char *func,
623a4c97b9175f95c4b1c6fc34e36c56f1e4ddbfLennart Poettering const char *object_name, const char *object) {
623a4c97b9175f95c4b1c6fc34e36c56f1e4ddbfLennart Poettering "PRIORITY=%i\n"
623a4c97b9175f95c4b1c6fc34e36c56f1e4ddbfLennart Poettering "SYSLOG_FACILITY=%i\n"
623a4c97b9175f95c4b1c6fc34e36c56f1e4ddbfLennart Poettering "SYSLOG_IDENTIFIER=%s\n",
623a4c97b9175f95c4b1c6fc34e36c56f1e4ddbfLennart Poettering file ? LINE_MAX : 0, file, /* %.0s means no output */
623a4c97b9175f95c4b1c6fc34e36c56f1e4ddbfLennart Poettering line ? 1 : 0, line, /* %.0d means no output too, special case for 0 */
623a4c97b9175f95c4b1c6fc34e36c56f1e4ddbfLennart Poettering object ? LINE_MAX : 0, object, /* %.0s means no output */
78c6a153c47f8d597c827bdcaf8c4e42ac87f738Lennart Poettering const char *buffer) {
78c6a153c47f8d597c827bdcaf8c4e42ac87f738Lennart Poettering log_do_header(header, sizeof(header), level,
78c6a153c47f8d597c827bdcaf8c4e42ac87f738Lennart Poettering if (sendmsg(journal_fd, &mh, MSG_NOSIGNAL) < 0)
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering /* Patch in LOG_DAEMON facility if necessary */
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering log_target == LOG_TARGET_JOURNAL_OR_KMSG ||
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering k = write_to_journal(level, file, line, func,
0f84a72e3c0f58d71cff2121e6df1611eaf9c9eaDavid Herrmann } else if (k > 0)
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering if (log_target == LOG_TARGET_SYSLOG_OR_KMSG ||
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering k = write_to_syslog(level, file, line, func,
7e8e0422aeb16f2a09a40546c61df753d10029b6Lennart Poettering } else if (k > 0)
7e8e0422aeb16f2a09a40546c61df753d10029b6Lennart Poettering log_target == LOG_TARGET_SYSLOG_OR_KMSG ||
7e8e0422aeb16f2a09a40546c61df753d10029b6Lennart Poettering log_target == LOG_TARGET_JOURNAL_OR_KMSG ||
946c70944ebdf428ffeb9991a7449edbd4011461Zbigniew Jędrzejewski-Szmek k = write_to_kmsg(level, file, line, func,
0dae31d468b1a0e22d98921f7b0dbd92fd217167Zbigniew Jędrzejewski-Szmek } else if (k > 0)
0dae31d468b1a0e22d98921f7b0dbd92fd217167Zbigniew Jędrzejewski-Szmek k = write_to_console(level, file, line, func,
8db0d2f5c37e7e8f5bfce016cfdad7947a3ea939Zbigniew Jędrzejewski-Szmek /* This modifies the buffer... */
8db0d2f5c37e7e8f5bfce016cfdad7947a3ea939Zbigniew Jędrzejewski-Szmek if (_likely_(LOG_PRI(level) > log_max_level))
151226ab4bf276d60d51864330a99f886b923697Zbigniew Jędrzejewski-Szmek return log_dispatch(level, file, line, func, NULL, NULL, buffer);
03664a62914782dbd8f069bbcf8a0c8ca1df7010Lukas Nykryn const char *func,
50f1e641a93cacfc693b0c3d300bee5df0c8c460Tom Gundersen vsnprintf(buffer, sizeof(buffer), format, ap);
5d45a8808431987c370706d365fb0cc95cf03d52Tom Gundersen return log_dispatch(level, file, line, func, NULL, NULL, buffer);
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering const char *format, ...) {
0dae31d468b1a0e22d98921f7b0dbd92fd217167Zbigniew Jędrzejewski-Szmek r = log_metav(level, file, line, func, format, ap);
0dae31d468b1a0e22d98921f7b0dbd92fd217167Zbigniew Jędrzejewski-Szmek if (_likely_(LOG_PRI(level) > log_max_level))
0dae31d468b1a0e22d98921f7b0dbd92fd217167Zbigniew Jędrzejewski-Szmek vsnprintf(buffer, sizeof(buffer), format, ap);
0dae31d468b1a0e22d98921f7b0dbd92fd217167Zbigniew Jędrzejewski-Szmek return log_dispatch(level, file, line, func,
7c6423e19136a7b7b6ef3fe06b94822e582dda27Tom Gundersen const char *format, ...) {
50f1e641a93cacfc693b0c3d300bee5df0c8c460Tom Gundersen#pragma GCC diagnostic ignored "-Wformat-nonliteral"
50f1e641a93cacfc693b0c3d300bee5df0c8c460Tom Gundersenstatic void log_assert(int level, const char *text, const char *file, int line, const char *func, const char *format) {
2c1fb4f71206bf970d493294208c5d7597194856Lennart Poettering if (_likely_(LOG_PRI(level) > log_max_level))
50f1e641a93cacfc693b0c3d300bee5df0c8c460Tom Gundersen snprintf(buffer, sizeof(buffer), format, text, file, line, func);
50f1e641a93cacfc693b0c3d300bee5df0c8c460Tom Gundersen log_dispatch(level, file, line, func, NULL, NULL, buffer);
50f1e641a93cacfc693b0c3d300bee5df0c8c460Tom Gundersennoreturn void log_assert_failed(const char *text, const char *file, int line, const char *func) {
50f1e641a93cacfc693b0c3d300bee5df0c8c460Tom Gundersen log_assert(LOG_CRIT, text, file, line, func, "Assertion '%s' failed at %s:%u, function %s(). Aborting.");
50f1e641a93cacfc693b0c3d300bee5df0c8c460Tom Gundersennoreturn void log_assert_failed_unreachable(const char *text, const char *file, int line, const char *func) {
50f1e641a93cacfc693b0c3d300bee5df0c8c460Tom Gundersen log_assert(LOG_CRIT, text, file, line, func, "Code should not be reached '%s' at %s:%u, function %s(). Aborting.");
50f1e641a93cacfc693b0c3d300bee5df0c8c460Tom Gundersenvoid log_assert_failed_return(const char *text, const char *file, int line, const char *func) {
2001c80560e3dae69e14fd994d3978c187af48b8Lennart Poettering log_assert(LOG_DEBUG, text, file, line, func, "Assertion '%s' failed at %s:%u, function %s(). Ignoring.");
2001c80560e3dae69e14fd994d3978c187af48b8Lennart Poetteringint log_oom_internal(const char *file, int line, const char *func) {
2001c80560e3dae69e14fd994d3978c187af48b8Lennart Poettering log_meta(LOG_ERR, file, line, func, "Out of memory.");
2001c80560e3dae69e14fd994d3978c187af48b8Lennart Poettering const char *format, ...) {
2001c80560e3dae69e14fd994d3978c187af48b8Lennart Poettering if (_likely_(LOG_PRI(level) > log_max_level))
2001c80560e3dae69e14fd994d3978c187af48b8Lennart Poettering log_target == LOG_TARGET_JOURNAL_OR_KMSG ||
2001c80560e3dae69e14fd994d3978c187af48b8Lennart Poettering unsigned n = 0, i;
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering /* If the journal is available do structured logging */
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering log_do_header(header, sizeof(header), level,
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering while (format && n + 1 < ELEMENTSOF(iovec)) {
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering /* We need to copy the va_list structure,
9c92ce6d67f88beb31dd6555d12ae3f632218a39Lennart Poettering * since vasprintf() leaves it afterwards at
9c92ce6d67f88beb31dd6555d12ae3f632218a39Lennart Poettering * an undefined location */
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering /* Now, jump enough ahead, so that we point to
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering * the next format string */
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering if (sendmsg(journal_fd, &mh, MSG_NOSIGNAL) < 0)
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering /* Fallback if journal logging is not available */
8db0d2f5c37e7e8f5bfce016cfdad7947a3ea939Zbigniew Jędrzejewski-Szmek if (startswith(buf, "MESSAGE=")) {
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering r = log_dispatch(level, file, line, func,
7b50eb2efa122200e39646c19a29abab302f7d24Lennart Poetteringint log_set_target_from_string(const char *e) {
946c70944ebdf428ffeb9991a7449edbd4011461Zbigniew Jędrzejewski-Szmekint log_set_max_level_from_string(const char *e) {
0dae31d468b1a0e22d98921f7b0dbd92fd217167Zbigniew Jędrzejewski-Szmek _cleanup_free_ char *line = NULL;
abf126a355e2f2b62b6c51ab3bb37895d1e3eee7Tom Gundersen log_warning("Failed to read /proc/cmdline. Ignoring: %s", strerror(-r));
abf126a355e2f2b62b6c51ab3bb37895d1e3eee7Tom Gundersen else if (r > 0) {
8db0d2f5c37e7e8f5bfce016cfdad7947a3ea939Zbigniew Jędrzejewski-Szmek log_warning("Failed to parse log target %s. Ignoring.", e);
8db0d2f5c37e7e8f5bfce016cfdad7947a3ea939Zbigniew Jędrzejewski-Szmek e = secure_getenv("SYSTEMD_LOG_LEVEL");
7b50eb2efa122200e39646c19a29abab302f7d24Lennart Poettering if (e && log_set_max_level_from_string(e) < 0)
42cc2eebb01056beb7acd3ecfe8e533558237f84Lennart Poettering log_warning("Failed to parse log level %s. Ignoring.", e);
42cc2eebb01056beb7acd3ecfe8e533558237f84Lennart Poettering if (e && log_show_color_from_string(e) < 0)
42cc2eebb01056beb7acd3ecfe8e533558237f84Lennart Poettering log_warning("Failed to parse bool %s. Ignoring.", e);
42cc2eebb01056beb7acd3ecfe8e533558237f84Lennart Poettering e = secure_getenv("SYSTEMD_LOG_LOCATION");
7b50eb2efa122200e39646c19a29abab302f7d24Lennart Poettering if (e && log_show_location_from_string(e) < 0)
42cc2eebb01056beb7acd3ecfe8e533558237f84Lennart Poettering log_warning("Failed to parse bool %s. Ignoring.", e);
7b50eb2efa122200e39646c19a29abab302f7d24Lennart Poetteringint log_show_color_from_string(const char *e) {
1bf968f36393666f2c57953b1748e6219c027deeTom Gundersenint log_show_location_from_string(const char *e) {
151226ab4bf276d60d51864330a99f886b923697Zbigniew Jędrzejewski-Szmek if (log_target == LOG_TARGET_CONSOLE)
7c6423e19136a7b7b6ef3fe06b94822e582dda27Tom Gundersen return syslog_fd < 0 && kmsg_fd < 0 && journal_fd < 0;
151226ab4bf276d60d51864330a99f886b923697Zbigniew Jędrzejewski-Szmekstatic const char *const log_target_table[] = {
151226ab4bf276d60d51864330a99f886b923697Zbigniew Jędrzejewski-Szmek [LOG_TARGET_CONSOLE] = "console",
151226ab4bf276d60d51864330a99f886b923697Zbigniew Jędrzejewski-Szmek [LOG_TARGET_JOURNAL] = "journal",
151226ab4bf276d60d51864330a99f886b923697Zbigniew Jędrzejewski-Szmek [LOG_TARGET_JOURNAL_OR_KMSG] = "journal-or-kmsg",
7c6423e19136a7b7b6ef3fe06b94822e582dda27Tom Gundersen [LOG_TARGET_SYSLOG_OR_KMSG] = "syslog-or-kmsg",