2 This file is part of systemd.
4 Copyright 2010 Lennart Poettering
6 systemd is free software; you can redistribute it and/or modify it
7 under the terms of the GNU Lesser General Public License as published by
8 the Free Software Foundation; either version 2.1 of the License, or
9 (at your option) any later version.
11 systemd is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public License
17 along with systemd; If not, see <http://www.gnu.org/licenses/>.
28 #include <sys/signalfd.h>
29 #include <sys/socket.h>
36 #include "sd-messages.h"
38 #include "alloc-util.h"
40 #include "format-util.h"
45 #include "parse-util.h"
46 #include "proc-cmdline.h"
47 #include "process-util.h"
48 #include "signal-util.h"
49 #include "socket-util.h"
50 #include "stdio-util.h"
51 #include "string-table.h"
52 #include "string-util.h"
53 #include "syslog-util.h"
54 #include "terminal-util.h"
55 #include "time-util.h"
58 #define SNDBUF_SIZE (8*1024*1024)
60 static LogTarget log_target
= LOG_TARGET_CONSOLE
;
61 static int log_max_level
= LOG_INFO
;
62 static int log_facility
= LOG_DAEMON
;
64 static int console_fd
= STDERR_FILENO
;
65 static int syslog_fd
= -1;
66 static int kmsg_fd
= -1;
67 static int journal_fd
= -1;
69 static bool syslog_is_stream
= false;
71 static bool show_color
= false;
72 static bool show_location
= false;
74 static bool upgrade_syslog_to_journal
= false;
76 /* Akin to glibc's __abort_msg; which is private and we hence cannot
78 static char *log_abort_msg
= NULL
;
80 void log_close_console(void) {
87 safe_close(console_fd
);
93 static int log_open_console(void) {
99 console_fd
= open_terminal("/dev/console", O_WRONLY
|O_NOCTTY
|O_CLOEXEC
);
103 console_fd
= STDERR_FILENO
;
108 void log_close_kmsg(void) {
109 kmsg_fd
= safe_close(kmsg_fd
);
112 static int log_open_kmsg(void) {
117 kmsg_fd
= open("/dev/kmsg", O_WRONLY
|O_NOCTTY
|O_CLOEXEC
);
124 void log_close_syslog(void) {
125 syslog_fd
= safe_close(syslog_fd
);
128 static int create_log_socket(int type
) {
132 fd
= socket(AF_UNIX
, type
|SOCK_CLOEXEC
, 0);
136 (void) fd_inc_sndbuf(fd
, SNDBUF_SIZE
);
138 /* We need a blocking fd here since we'd otherwise lose
139 messages way too early. However, let's not hang forever in the
140 unlikely case of a deadlock. */
142 timeval_store(&tv
, 10 * USEC_PER_MSEC
);
144 timeval_store(&tv
, 10 * USEC_PER_SEC
);
145 (void) setsockopt(fd
, SOL_SOCKET
, SO_SNDTIMEO
, &tv
, sizeof(tv
));
150 static int log_open_syslog(void) {
152 static const union sockaddr_union sa
= {
153 .un
.sun_family
= AF_UNIX
,
154 .un
.sun_path
= "/dev/log",
162 syslog_fd
= create_log_socket(SOCK_DGRAM
);
168 if (connect(syslog_fd
, &sa
.sa
, SOCKADDR_UN_LEN(sa
.un
)) < 0) {
169 safe_close(syslog_fd
);
171 /* Some legacy syslog systems still use stream
172 * sockets. They really shouldn't. But what can we
174 syslog_fd
= create_log_socket(SOCK_STREAM
);
180 if (connect(syslog_fd
, &sa
.sa
, SOCKADDR_UN_LEN(sa
.un
)) < 0) {
185 syslog_is_stream
= true;
187 syslog_is_stream
= false;
196 void log_close_journal(void) {
197 journal_fd
= safe_close(journal_fd
);
200 static int log_open_journal(void) {
202 static const union sockaddr_union sa
= {
203 .un
.sun_family
= AF_UNIX
,
204 .un
.sun_path
= "/run/systemd/journal/socket",
212 journal_fd
= create_log_socket(SOCK_DGRAM
);
213 if (journal_fd
< 0) {
218 if (connect(journal_fd
, &sa
.sa
, SOCKADDR_UN_LEN(sa
.un
)) < 0) {
233 /* If we don't use the console we close it here, to not get
234 * killed by SAK. If we don't use syslog we close it here so
235 * that we are not confused by somebody deleting the socket in
236 * the fs. If we don't use /dev/kmsg we still keep it open,
237 * because there is no reason to close it. */
239 if (log_target
== LOG_TARGET_NULL
) {
246 if (!IN_SET(log_target
, LOG_TARGET_AUTO
, LOG_TARGET_SAFE
) ||
248 isatty(STDERR_FILENO
) <= 0) {
250 if (IN_SET(log_target
, LOG_TARGET_AUTO
,
251 LOG_TARGET_JOURNAL_OR_KMSG
,
252 LOG_TARGET_JOURNAL
)) {
253 r
= log_open_journal();
261 if (IN_SET(log_target
, LOG_TARGET_SYSLOG_OR_KMSG
,
262 LOG_TARGET_SYSLOG
)) {
263 r
= log_open_syslog();
271 if (IN_SET(log_target
, LOG_TARGET_AUTO
,
273 LOG_TARGET_JOURNAL_OR_KMSG
,
274 LOG_TARGET_SYSLOG_OR_KMSG
,
289 return log_open_console();
292 void log_set_target(LogTarget target
) {
294 assert(target
< _LOG_TARGET_MAX
);
296 if (upgrade_syslog_to_journal
) {
297 if (target
== LOG_TARGET_SYSLOG
)
298 target
= LOG_TARGET_JOURNAL
;
299 else if (target
== LOG_TARGET_SYSLOG_OR_KMSG
)
300 target
= LOG_TARGET_JOURNAL_OR_KMSG
;
306 void log_close(void) {
313 void log_forget_fds(void) {
314 console_fd
= kmsg_fd
= syslog_fd
= journal_fd
= -1;
317 void log_set_max_level(int level
) {
318 assert((level
& LOG_PRIMASK
) == level
);
320 log_max_level
= level
;
323 void log_set_facility(int facility
) {
324 log_facility
= facility
;
327 static int write_to_console(
333 const char *buffer
) {
335 char location
[256], prefix
[1 + DECIMAL_STR_MAX(int) + 2];
336 struct iovec iovec
[6] = {};
343 if (log_target
== LOG_TARGET_CONSOLE_PREFIXED
) {
344 xsprintf(prefix
, "<%i>", level
);
345 IOVEC_SET_STRING(iovec
[n
++], prefix
);
348 highlight
= LOG_PRI(level
) <= LOG_ERR
&& show_color
;
351 snprintf(location
, sizeof(location
), "(%s:%i) ", file
, line
);
352 IOVEC_SET_STRING(iovec
[n
++], location
);
356 IOVEC_SET_STRING(iovec
[n
++], ANSI_HIGHLIGHT_RED
);
357 IOVEC_SET_STRING(iovec
[n
++], buffer
);
359 IOVEC_SET_STRING(iovec
[n
++], ANSI_NORMAL
);
360 IOVEC_SET_STRING(iovec
[n
++], "\n");
362 if (writev(console_fd
, iovec
, n
) < 0) {
364 if (errno
== EIO
&& getpid() == 1) {
366 /* If somebody tried to kick us from our
367 * console tty (via vhangup() or suchlike),
368 * try to reconnect */
376 if (writev(console_fd
, iovec
, n
) < 0)
385 static int write_to_syslog(
391 const char *buffer
) {
393 char header_priority
[2 + DECIMAL_STR_MAX(int) + 1],
395 header_pid
[4 + DECIMAL_STR_MAX(pid_t
) + 1];
396 struct iovec iovec
[5] = {};
397 struct msghdr msghdr
= {
399 .msg_iovlen
= ELEMENTSOF(iovec
),
407 xsprintf(header_priority
, "<%i>", level
);
409 t
= (time_t) (now(CLOCK_REALTIME
) / USEC_PER_SEC
);
414 if (strftime(header_time
, sizeof(header_time
), "%h %e %T ", tm
) <= 0)
417 xsprintf(header_pid
, "["PID_FMT
"]: ", getpid());
419 IOVEC_SET_STRING(iovec
[0], header_priority
);
420 IOVEC_SET_STRING(iovec
[1], header_time
);
421 IOVEC_SET_STRING(iovec
[2], program_invocation_short_name
);
422 IOVEC_SET_STRING(iovec
[3], header_pid
);
423 IOVEC_SET_STRING(iovec
[4], buffer
);
425 /* When using syslog via SOCK_STREAM separate the messages by NUL chars */
426 if (syslog_is_stream
)
432 n
= sendmsg(syslog_fd
, &msghdr
, MSG_NOSIGNAL
);
436 if (!syslog_is_stream
||
437 (size_t) n
>= IOVEC_TOTAL_SIZE(iovec
, ELEMENTSOF(iovec
)))
440 IOVEC_INCREMENT(iovec
, ELEMENTSOF(iovec
), n
);
446 static int write_to_kmsg(
452 const char *buffer
) {
454 char header_priority
[2 + DECIMAL_STR_MAX(int) + 1],
455 header_pid
[4 + DECIMAL_STR_MAX(pid_t
) + 1];
456 struct iovec iovec
[5] = {};
461 xsprintf(header_priority
, "<%i>", level
);
462 xsprintf(header_pid
, "["PID_FMT
"]: ", getpid());
464 IOVEC_SET_STRING(iovec
[0], header_priority
);
465 IOVEC_SET_STRING(iovec
[1], program_invocation_short_name
);
466 IOVEC_SET_STRING(iovec
[2], header_pid
);
467 IOVEC_SET_STRING(iovec
[3], buffer
);
468 IOVEC_SET_STRING(iovec
[4], "\n");
470 if (writev(kmsg_fd
, iovec
, ELEMENTSOF(iovec
)) < 0)
476 static int log_do_header(
481 const char *file
, int line
, const char *func
,
482 const char *object_field
, const char *object
,
483 const char *extra_field
, const char *extra
) {
485 snprintf(header
, size
,
487 "SYSLOG_FACILITY=%i\n"
494 "SYSLOG_IDENTIFIER=%s\n",
497 isempty(file
) ? "" : "CODE_FILE=",
498 isempty(file
) ? "" : file
,
499 isempty(file
) ? "" : "\n",
500 line
? "CODE_LINE=" : "",
501 line
? 1 : 0, line
, /* %.0d means no output too, special case for 0 */
503 isempty(func
) ? "" : "CODE_FUNC=",
504 isempty(func
) ? "" : func
,
505 isempty(func
) ? "" : "\n",
506 error
? "ERRNO=" : "",
507 error
? 1 : 0, error
,
509 isempty(object
) ? "" : object_field
,
510 isempty(object
) ? "" : object
,
511 isempty(object
) ? "" : "\n",
512 isempty(extra
) ? "" : extra_field
,
513 isempty(extra
) ? "" : extra
,
514 isempty(extra
) ? "" : "\n",
515 program_invocation_short_name
);
520 static int write_to_journal(
526 const char *object_field
,
528 const char *extra_field
,
530 const char *buffer
) {
532 char header
[LINE_MAX
];
533 struct iovec iovec
[4] = {};
534 struct msghdr mh
= {};
539 log_do_header(header
, sizeof(header
), level
, error
, file
, line
, func
, object_field
, object
, extra_field
, extra
);
541 IOVEC_SET_STRING(iovec
[0], header
);
542 IOVEC_SET_STRING(iovec
[1], "MESSAGE=");
543 IOVEC_SET_STRING(iovec
[2], buffer
);
544 IOVEC_SET_STRING(iovec
[3], "\n");
547 mh
.msg_iovlen
= ELEMENTSOF(iovec
);
549 if (sendmsg(journal_fd
, &mh
, MSG_NOSIGNAL
) < 0)
555 static int log_dispatch(
561 const char *object_field
,
564 const char *extra_field
,
572 if (log_target
== LOG_TARGET_NULL
)
575 /* Patch in LOG_DAEMON facility if necessary */
576 if ((level
& LOG_FACMASK
) == 0)
577 level
= log_facility
| LOG_PRI(level
);
583 buffer
+= strspn(buffer
, NEWLINE
);
588 if ((e
= strpbrk(buffer
, NEWLINE
)))
591 if (IN_SET(log_target
, LOG_TARGET_AUTO
,
592 LOG_TARGET_JOURNAL_OR_KMSG
,
593 LOG_TARGET_JOURNAL
)) {
595 k
= write_to_journal(level
, error
, file
, line
, func
, object_field
, object
, extra_field
, extra
, buffer
);
603 if (IN_SET(log_target
, LOG_TARGET_SYSLOG_OR_KMSG
,
604 LOG_TARGET_SYSLOG
)) {
606 k
= write_to_syslog(level
, error
, file
, line
, func
, buffer
);
615 IN_SET(log_target
, LOG_TARGET_AUTO
,
617 LOG_TARGET_SYSLOG_OR_KMSG
,
618 LOG_TARGET_JOURNAL_OR_KMSG
,
621 k
= write_to_kmsg(level
, error
, file
, line
, func
, buffer
);
629 (void) write_to_console(level
, error
, file
, line
, func
, buffer
);
637 int log_dump_internal(
647 /* This modifies the buffer... */
652 if (_likely_(LOG_PRI(level
) > log_max_level
))
655 return log_dispatch(level
, error
, file
, line
, func
, NULL
, NULL
, NULL
, NULL
, buffer
);
668 char buffer
[LINE_MAX
];
673 if (_likely_(LOG_PRI(level
) > log_max_level
))
676 /* Make sure that %m maps to the specified error */
680 vsnprintf(buffer
, sizeof(buffer
), format
, ap
);
682 return log_dispatch(level
, error
, file
, line
, func
, NULL
, NULL
, NULL
, NULL
, buffer
);
691 const char *format
, ...) {
696 va_start(ap
, format
);
697 r
= log_internalv(level
, error
, file
, line
, func
, format
, ap
);
703 int log_object_internalv(
709 const char *object_field
,
711 const char *extra_field
,
723 if (_likely_(LOG_PRI(level
) > log_max_level
))
726 /* Make sure that %m maps to the specified error */
730 /* Prepend the object name before the message */
735 l
= n
+ 2 + LINE_MAX
;
737 buffer
= newa(char, l
);
738 b
= stpcpy(stpcpy(buffer
, object
), ": ");
741 b
= buffer
= newa(char, l
);
744 vsnprintf(b
, l
, format
, ap
);
746 return log_dispatch(level
, error
, file
, line
, func
, object_field
, object
, extra_field
, extra
, buffer
);
749 int log_object_internal(
755 const char *object_field
,
757 const char *extra_field
,
759 const char *format
, ...) {
764 va_start(ap
, format
);
765 r
= log_object_internalv(level
, error
, file
, line
, func
, object_field
, object
, extra_field
, extra
, format
, ap
);
771 static void log_assert(
777 const char *format
) {
779 static char buffer
[LINE_MAX
];
781 if (_likely_(LOG_PRI(level
) > log_max_level
))
784 DISABLE_WARNING_FORMAT_NONLITERAL
;
785 snprintf(buffer
, sizeof buffer
, format
, text
, file
, line
, func
);
788 log_abort_msg
= buffer
;
790 log_dispatch(level
, 0, file
, line
, func
, NULL
, NULL
, NULL
, NULL
, buffer
);
793 noreturn
void log_assert_failed(const char *text
, const char *file
, int line
, const char *func
) {
794 log_assert(LOG_CRIT
, text
, file
, line
, func
, "Assertion '%s' failed at %s:%u, function %s(). Aborting.");
798 noreturn
void log_assert_failed_unreachable(const char *text
, const char *file
, int line
, const char *func
) {
799 log_assert(LOG_CRIT
, text
, file
, line
, func
, "Code should not be reached '%s' at %s:%u, function %s(). Aborting.");
803 void log_assert_failed_return(const char *text
, const char *file
, int line
, const char *func
) {
805 log_assert(LOG_DEBUG
, text
, file
, line
, func
, "Assertion '%s' failed at %s:%u, function %s(). Ignoring.");
808 int log_oom_internal(const char *file
, int line
, const char *func
) {
809 log_internal(LOG_ERR
, ENOMEM
, file
, line
, func
, "Out of memory.");
813 int log_format_iovec(
817 bool newline_separator
,
822 static const char nl
= '\n';
824 while (format
&& *n
+ 1 < iovec_len
) {
829 /* We need to copy the va_list structure,
830 * since vasprintf() leaves it afterwards at
831 * an undefined location */
837 r
= vasprintf(&m
, format
, aq
);
842 /* Now, jump enough ahead, so that we point to
843 * the next format string */
844 VA_FORMAT_ADVANCE(format
, ap
);
846 IOVEC_SET_STRING(iovec
[(*n
)++], m
);
848 if (newline_separator
) {
849 iovec
[*n
].iov_base
= (char*) &nl
;
850 iovec
[*n
].iov_len
= 1;
854 format
= va_arg(ap
, char *);
859 int log_struct_internal(
865 const char *format
, ...) {
875 if (_likely_(LOG_PRI(level
) > log_max_level
))
878 if (log_target
== LOG_TARGET_NULL
)
881 if ((level
& LOG_FACMASK
) == 0)
882 level
= log_facility
| LOG_PRI(level
);
884 if (IN_SET(log_target
, LOG_TARGET_AUTO
,
885 LOG_TARGET_JOURNAL_OR_KMSG
,
886 LOG_TARGET_JOURNAL
) &&
888 char header
[LINE_MAX
];
889 struct iovec iovec
[17] = {};
895 bool fallback
= false;
897 /* If the journal is available do structured logging */
898 log_do_header(header
, sizeof(header
), level
, error
, file
, line
, func
, NULL
, NULL
, NULL
, NULL
);
899 IOVEC_SET_STRING(iovec
[n
++], header
);
901 va_start(ap
, format
);
902 r
= log_format_iovec(iovec
, ELEMENTSOF(iovec
), &n
, true, error
, format
, ap
);
907 (void) sendmsg(journal_fd
, &mh
, MSG_NOSIGNAL
);
911 for (i
= 1; i
< n
; i
+= 2)
912 free(iovec
[i
].iov_base
);
918 /* Fallback if journal logging is not available or didn't work. */
920 va_start(ap
, format
);
928 vsnprintf(buf
, sizeof(buf
), format
, aq
);
931 if (startswith(buf
, "MESSAGE=")) {
936 VA_FORMAT_ADVANCE(format
, ap
);
938 format
= va_arg(ap
, char *);
945 return log_dispatch(level
, error
, file
, line
, func
, NULL
, NULL
, NULL
, NULL
, buf
+ 8);
948 int log_set_target_from_string(const char *e
) {
951 t
= log_target_from_string(e
);
959 int log_set_max_level_from_string(const char *e
) {
962 t
= log_level_from_string(e
);
966 log_set_max_level(t
);
970 static int parse_proc_cmdline_item(const char *key
, const char *value
, void *data
) {
973 * The systemd.log_xyz= settings are parsed by all tools, and
976 * However, "quiet" is only parsed by PID 1, and only turns of
977 * status output to /dev/console, but does not alter the log
981 if (streq(key
, "debug") && !value
)
982 log_set_max_level(LOG_DEBUG
);
984 else if (proc_cmdline_key_streq(key
, "systemd.log_target")) {
986 if (proc_cmdline_value_missing(key
, value
))
989 if (log_set_target_from_string(value
) < 0)
990 log_warning("Failed to parse log target '%s'. Ignoring.", value
);
992 } else if (proc_cmdline_key_streq(key
, "systemd.log_level")) {
994 if (proc_cmdline_value_missing(key
, value
))
997 if (log_set_max_level_from_string(value
) < 0)
998 log_warning("Failed to parse log level '%s'. Ignoring.", value
);
1000 } else if (proc_cmdline_key_streq(key
, "systemd.log_color")) {
1002 if (log_show_color_from_string(value
?: "1") < 0)
1003 log_warning("Failed to parse log color setting '%s'. Ignoring.", value
);
1005 } else if (proc_cmdline_key_streq(key
, "systemd.log_location")) {
1007 if (log_show_location_from_string(value
?: "1") < 0)
1008 log_warning("Failed to parse log location setting '%s'. Ignoring.", value
);
1014 void log_parse_environment(void) {
1017 if (get_ctty_devnr(0, NULL
) < 0)
1018 /* Only try to read the command line in daemons. We assume that anything that has a controlling tty is
1020 (void) proc_cmdline_parse(parse_proc_cmdline_item
, NULL
, PROC_CMDLINE_STRIP_RD_PREFIX
);
1022 e
= secure_getenv("SYSTEMD_LOG_TARGET");
1023 if (e
&& log_set_target_from_string(e
) < 0)
1024 log_warning("Failed to parse log target '%s'. Ignoring.", e
);
1026 e
= secure_getenv("SYSTEMD_LOG_LEVEL");
1027 if (e
&& log_set_max_level_from_string(e
) < 0)
1028 log_warning("Failed to parse log level '%s'. Ignoring.", e
);
1030 e
= secure_getenv("SYSTEMD_LOG_COLOR");
1031 if (e
&& log_show_color_from_string(e
) < 0)
1032 log_warning("Failed to parse bool '%s'. Ignoring.", e
);
1034 e
= secure_getenv("SYSTEMD_LOG_LOCATION");
1035 if (e
&& log_show_location_from_string(e
) < 0)
1036 log_warning("Failed to parse bool '%s'. Ignoring.", e
);
1039 LogTarget
log_get_target(void) {
1043 int log_get_max_level(void) {
1044 return log_max_level
;
1047 void log_show_color(bool b
) {
1051 bool log_get_show_color(void) {
1055 void log_show_location(bool b
) {
1059 bool log_get_show_location(void) {
1060 return show_location
;
1063 int log_show_color_from_string(const char *e
) {
1066 t
= parse_boolean(e
);
1074 int log_show_location_from_string(const char *e
) {
1077 t
= parse_boolean(e
);
1081 log_show_location(t
);
1085 bool log_on_console(void) {
1086 if (IN_SET(log_target
, LOG_TARGET_CONSOLE
,
1087 LOG_TARGET_CONSOLE_PREFIXED
))
1090 return syslog_fd
< 0 && kmsg_fd
< 0 && journal_fd
< 0;
1093 static const char *const log_target_table
[_LOG_TARGET_MAX
] = {
1094 [LOG_TARGET_CONSOLE
] = "console",
1095 [LOG_TARGET_CONSOLE_PREFIXED
] = "console-prefixed",
1096 [LOG_TARGET_KMSG
] = "kmsg",
1097 [LOG_TARGET_JOURNAL
] = "journal",
1098 [LOG_TARGET_JOURNAL_OR_KMSG
] = "journal-or-kmsg",
1099 [LOG_TARGET_SYSLOG
] = "syslog",
1100 [LOG_TARGET_SYSLOG_OR_KMSG
] = "syslog-or-kmsg",
1101 [LOG_TARGET_AUTO
] = "auto",
1102 [LOG_TARGET_SAFE
] = "safe",
1103 [LOG_TARGET_NULL
] = "null"
1106 DEFINE_STRING_TABLE_LOOKUP(log_target
, LogTarget
);
1108 void log_received_signal(int level
, const struct signalfd_siginfo
*si
) {
1109 if (si
->ssi_pid
> 0) {
1110 _cleanup_free_
char *p
= NULL
;
1112 get_process_comm(si
->ssi_pid
, &p
);
1115 "Received SIG%s from PID %"PRIu32
" (%s).",
1116 signal_to_string(si
->ssi_signo
),
1117 si
->ssi_pid
, strna(p
));
1121 signal_to_string(si
->ssi_signo
));
1125 void log_set_upgrade_syslog_to_journal(bool b
) {
1126 upgrade_syslog_to_journal
= b
;
1129 int log_syntax_internal(
1132 const char *config_file
,
1133 unsigned config_line
,
1138 const char *format
, ...) {
1141 char buffer
[LINE_MAX
];
1143 const char *unit_fmt
= NULL
;
1148 if (_likely_(LOG_PRI(level
) > log_max_level
))
1151 if (log_target
== LOG_TARGET_NULL
)
1157 va_start(ap
, format
);
1158 vsnprintf(buffer
, sizeof(buffer
), format
, ap
);
1162 unit_fmt
= getpid() == 1 ? "UNIT=%s" : "USER_UNIT=%s";
1164 return log_struct_internal(
1167 LOG_MESSAGE_ID(SD_MESSAGE_INVALID_CONFIGURATION
),
1168 "CONFIG_FILE=%s", config_file
,
1169 "CONFIG_LINE=%u", config_line
,
1170 LOG_MESSAGE("%s:%u: %s", config_file
, config_line
, buffer
),