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 "formats-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 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
, offsetof(struct sockaddr_un
, sun_path
) + strlen(sa
.un
.sun_path
)) < 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
, offsetof(struct sockaddr_un
, sun_path
) + strlen(sa
.un
.sun_path
)) < 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
, offsetof(struct sockaddr_un
, sun_path
) + strlen(sa
.un
.sun_path
)) < 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 ((log_target
!= LOG_TARGET_AUTO
&& log_target
!= LOG_TARGET_SAFE
) ||
248 isatty(STDERR_FILENO
) <= 0) {
250 if (log_target
== LOG_TARGET_AUTO
||
251 log_target
== LOG_TARGET_JOURNAL_OR_KMSG
||
252 log_target
== LOG_TARGET_JOURNAL
) {
253 r
= log_open_journal();
261 if (log_target
== LOG_TARGET_SYSLOG_OR_KMSG
||
262 log_target
== LOG_TARGET_SYSLOG
) {
263 r
= log_open_syslog();
271 if (log_target
== LOG_TARGET_AUTO
||
272 log_target
== LOG_TARGET_SAFE
||
273 log_target
== LOG_TARGET_JOURNAL_OR_KMSG
||
274 log_target
== LOG_TARGET_SYSLOG_OR_KMSG
||
275 log_target
== LOG_TARGET_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 *object_field
,
335 const char *buffer
) {
337 char location
[64], prefix
[1 + DECIMAL_STR_MAX(int) + 2];
338 struct iovec iovec
[6] = {};
345 if (log_target
== LOG_TARGET_CONSOLE_PREFIXED
) {
346 sprintf(prefix
, "<%i>", level
);
347 IOVEC_SET_STRING(iovec
[n
++], prefix
);
350 highlight
= LOG_PRI(level
) <= LOG_ERR
&& show_color
;
353 xsprintf(location
, "(%s:%i) ", file
, line
);
354 IOVEC_SET_STRING(iovec
[n
++], location
);
358 IOVEC_SET_STRING(iovec
[n
++], ANSI_HIGHLIGHT_RED
);
359 IOVEC_SET_STRING(iovec
[n
++], buffer
);
361 IOVEC_SET_STRING(iovec
[n
++], ANSI_NORMAL
);
362 IOVEC_SET_STRING(iovec
[n
++], "\n");
364 if (writev(console_fd
, iovec
, n
) < 0) {
366 if (errno
== EIO
&& getpid() == 1) {
368 /* If somebody tried to kick us from our
369 * console tty (via vhangup() or suchlike),
370 * try to reconnect */
378 if (writev(console_fd
, iovec
, n
) < 0)
387 static int write_to_syslog(
393 const char *object_field
,
395 const char *buffer
) {
397 char header_priority
[2 + DECIMAL_STR_MAX(int) + 1],
399 header_pid
[4 + DECIMAL_STR_MAX(pid_t
) + 1];
400 struct iovec iovec
[5] = {};
401 struct msghdr msghdr
= {
403 .msg_iovlen
= ELEMENTSOF(iovec
),
411 xsprintf(header_priority
, "<%i>", level
);
413 t
= (time_t) (now(CLOCK_REALTIME
) / USEC_PER_SEC
);
418 if (strftime(header_time
, sizeof(header_time
), "%h %e %T ", tm
) <= 0)
421 xsprintf(header_pid
, "["PID_FMT
"]: ", getpid());
423 IOVEC_SET_STRING(iovec
[0], header_priority
);
424 IOVEC_SET_STRING(iovec
[1], header_time
);
425 IOVEC_SET_STRING(iovec
[2], program_invocation_short_name
);
426 IOVEC_SET_STRING(iovec
[3], header_pid
);
427 IOVEC_SET_STRING(iovec
[4], buffer
);
429 /* When using syslog via SOCK_STREAM separate the messages by NUL chars */
430 if (syslog_is_stream
)
436 n
= sendmsg(syslog_fd
, &msghdr
, MSG_NOSIGNAL
);
440 if (!syslog_is_stream
||
441 (size_t) n
>= IOVEC_TOTAL_SIZE(iovec
, ELEMENTSOF(iovec
)))
444 IOVEC_INCREMENT(iovec
, ELEMENTSOF(iovec
), n
);
450 static int write_to_kmsg(
456 const char *object_field
,
458 const char *buffer
) {
460 char header_priority
[2 + DECIMAL_STR_MAX(int) + 1],
461 header_pid
[4 + DECIMAL_STR_MAX(pid_t
) + 1];
462 struct iovec iovec
[5] = {};
467 xsprintf(header_priority
, "<%i>", level
);
468 xsprintf(header_pid
, "["PID_FMT
"]: ", getpid());
470 IOVEC_SET_STRING(iovec
[0], header_priority
);
471 IOVEC_SET_STRING(iovec
[1], program_invocation_short_name
);
472 IOVEC_SET_STRING(iovec
[2], header_pid
);
473 IOVEC_SET_STRING(iovec
[3], buffer
);
474 IOVEC_SET_STRING(iovec
[4], "\n");
476 if (writev(kmsg_fd
, iovec
, ELEMENTSOF(iovec
)) < 0)
482 static int log_do_header(
487 const char *file
, int line
, const char *func
,
488 const char *object_field
, const char *object
) {
490 snprintf(header
, size
,
492 "SYSLOG_FACILITY=%i\n"
498 "SYSLOG_IDENTIFIER=%s\n",
501 isempty(file
) ? "" : "CODE_FILE=",
502 isempty(file
) ? "" : file
,
503 isempty(file
) ? "" : "\n",
504 line
? "CODE_LINE=" : "",
505 line
? 1 : 0, line
, /* %.0d means no output too, special case for 0 */
507 isempty(func
) ? "" : "CODE_FUNCTION=",
508 isempty(func
) ? "" : func
,
509 isempty(func
) ? "" : "\n",
510 error
? "ERRNO=" : "",
511 error
? 1 : 0, error
,
513 isempty(object
) ? "" : object_field
,
514 isempty(object
) ? "" : object
,
515 isempty(object
) ? "" : "\n",
516 program_invocation_short_name
);
521 static int write_to_journal(
527 const char *object_field
,
529 const char *buffer
) {
531 char header
[LINE_MAX
];
532 struct iovec iovec
[4] = {};
533 struct msghdr mh
= {};
538 log_do_header(header
, sizeof(header
), level
, error
, file
, line
, func
, object_field
, object
);
540 IOVEC_SET_STRING(iovec
[0], header
);
541 IOVEC_SET_STRING(iovec
[1], "MESSAGE=");
542 IOVEC_SET_STRING(iovec
[2], buffer
);
543 IOVEC_SET_STRING(iovec
[3], "\n");
546 mh
.msg_iovlen
= ELEMENTSOF(iovec
);
548 if (sendmsg(journal_fd
, &mh
, MSG_NOSIGNAL
) < 0)
554 static int log_dispatch(
560 const char *object_field
,
566 if (log_target
== LOG_TARGET_NULL
)
569 /* Patch in LOG_DAEMON facility if necessary */
570 if ((level
& LOG_FACMASK
) == 0)
571 level
= log_facility
| LOG_PRI(level
);
580 buffer
+= strspn(buffer
, NEWLINE
);
585 if ((e
= strpbrk(buffer
, NEWLINE
)))
588 if (log_target
== LOG_TARGET_AUTO
||
589 log_target
== LOG_TARGET_JOURNAL_OR_KMSG
||
590 log_target
== LOG_TARGET_JOURNAL
) {
592 k
= write_to_journal(level
, error
, file
, line
, func
, object_field
, object
, buffer
);
600 if (log_target
== LOG_TARGET_SYSLOG_OR_KMSG
||
601 log_target
== LOG_TARGET_SYSLOG
) {
603 k
= write_to_syslog(level
, error
, file
, line
, func
, object_field
, object
, buffer
);
612 (log_target
== LOG_TARGET_AUTO
||
613 log_target
== LOG_TARGET_SAFE
||
614 log_target
== LOG_TARGET_SYSLOG_OR_KMSG
||
615 log_target
== LOG_TARGET_JOURNAL_OR_KMSG
||
616 log_target
== LOG_TARGET_KMSG
)) {
618 k
= write_to_kmsg(level
, error
, file
, line
, func
, object_field
, object
, buffer
);
626 (void) write_to_console(level
, error
, file
, line
, func
, object_field
, object
, buffer
);
634 int log_dump_internal(
644 /* This modifies the buffer... */
649 if (_likely_(LOG_PRI(level
) > log_max_level
))
652 return log_dispatch(level
, error
, file
, line
, func
, NULL
, NULL
, buffer
);
665 char buffer
[LINE_MAX
];
670 if (_likely_(LOG_PRI(level
) > log_max_level
))
673 /* Make sure that %m maps to the specified error */
677 vsnprintf(buffer
, sizeof(buffer
), format
, ap
);
679 return log_dispatch(level
, error
, file
, line
, func
, NULL
, NULL
, buffer
);
688 const char *format
, ...) {
693 va_start(ap
, format
);
694 r
= log_internalv(level
, error
, file
, line
, func
, format
, ap
);
700 int log_object_internalv(
706 const char *object_field
,
718 if (_likely_(LOG_PRI(level
) > log_max_level
))
721 /* Make sure that %m maps to the specified error */
725 /* Prepend the object name before the message */
730 l
= n
+ 2 + LINE_MAX
;
732 buffer
= newa(char, l
);
733 b
= stpcpy(stpcpy(buffer
, object
), ": ");
736 b
= buffer
= newa(char, l
);
739 vsnprintf(b
, l
, format
, ap
);
741 return log_dispatch(level
, error
, file
, line
, func
, object_field
, object
, buffer
);
744 int log_object_internal(
750 const char *object_field
,
752 const char *format
, ...) {
757 va_start(ap
, format
);
758 r
= log_object_internalv(level
, error
, file
, line
, func
, object_field
, object
, format
, ap
);
764 static void log_assert(
770 const char *format
) {
772 static char buffer
[LINE_MAX
];
774 if (_likely_(LOG_PRI(level
) > log_max_level
))
777 DISABLE_WARNING_FORMAT_NONLITERAL
;
778 xsprintf(buffer
, format
, text
, file
, line
, func
);
781 log_abort_msg
= buffer
;
783 log_dispatch(level
, 0, file
, line
, func
, NULL
, NULL
, buffer
);
786 noreturn
void log_assert_failed(const char *text
, const char *file
, int line
, const char *func
) {
787 log_assert(LOG_CRIT
, text
, file
, line
, func
, "Assertion '%s' failed at %s:%u, function %s(). Aborting.");
791 noreturn
void log_assert_failed_unreachable(const char *text
, const char *file
, int line
, const char *func
) {
792 log_assert(LOG_CRIT
, text
, file
, line
, func
, "Code should not be reached '%s' at %s:%u, function %s(). Aborting.");
796 void log_assert_failed_return(const char *text
, const char *file
, int line
, const char *func
) {
798 log_assert(LOG_DEBUG
, text
, file
, line
, func
, "Assertion '%s' failed at %s:%u, function %s(). Ignoring.");
801 int log_oom_internal(const char *file
, int line
, const char *func
) {
802 log_internal(LOG_ERR
, ENOMEM
, file
, line
, func
, "Out of memory.");
806 int log_format_iovec(
810 bool newline_separator
,
815 static const char nl
= '\n';
817 while (format
&& *n
+ 1 < iovec_len
) {
822 /* We need to copy the va_list structure,
823 * since vasprintf() leaves it afterwards at
824 * an undefined location */
830 r
= vasprintf(&m
, format
, aq
);
835 /* Now, jump enough ahead, so that we point to
836 * the next format string */
837 VA_FORMAT_ADVANCE(format
, ap
);
839 IOVEC_SET_STRING(iovec
[(*n
)++], m
);
841 if (newline_separator
) {
842 iovec
[*n
].iov_base
= (char*) &nl
;
843 iovec
[*n
].iov_len
= 1;
847 format
= va_arg(ap
, char *);
852 int log_struct_internal(
858 const char *format
, ...) {
868 if (_likely_(LOG_PRI(level
) > log_max_level
))
871 if (log_target
== LOG_TARGET_NULL
)
874 if ((level
& LOG_FACMASK
) == 0)
875 level
= log_facility
| LOG_PRI(level
);
877 if ((log_target
== LOG_TARGET_AUTO
||
878 log_target
== LOG_TARGET_JOURNAL_OR_KMSG
||
879 log_target
== LOG_TARGET_JOURNAL
) &&
881 char header
[LINE_MAX
];
882 struct iovec iovec
[17] = {};
888 bool fallback
= false;
890 /* If the journal is available do structured logging */
891 log_do_header(header
, sizeof(header
), level
, error
, file
, line
, func
, NULL
, NULL
);
892 IOVEC_SET_STRING(iovec
[n
++], header
);
894 va_start(ap
, format
);
895 r
= log_format_iovec(iovec
, ELEMENTSOF(iovec
), &n
, true, error
, format
, ap
);
900 (void) sendmsg(journal_fd
, &mh
, MSG_NOSIGNAL
);
904 for (i
= 1; i
< n
; i
+= 2)
905 free(iovec
[i
].iov_base
);
911 /* Fallback if journal logging is not available or didn't work. */
913 va_start(ap
, format
);
921 vsnprintf(buf
, sizeof(buf
), format
, aq
);
924 if (startswith(buf
, "MESSAGE=")) {
929 VA_FORMAT_ADVANCE(format
, ap
);
931 format
= va_arg(ap
, char *);
938 return log_dispatch(level
, error
, file
, line
, func
, NULL
, NULL
, buf
+ 8);
941 int log_set_target_from_string(const char *e
) {
944 t
= log_target_from_string(e
);
952 int log_set_max_level_from_string(const char *e
) {
955 t
= log_level_from_string(e
);
959 log_set_max_level(t
);
963 static int parse_proc_cmdline_item(const char *key
, const char *value
) {
966 * The systemd.log_xyz= settings are parsed by all tools, and
969 * However, "quiet" is only parsed by PID 1, and only turns of
970 * status output to /dev/console, but does not alter the log
974 if (streq(key
, "debug") && !value
)
975 log_set_max_level(LOG_DEBUG
);
977 else if (streq(key
, "systemd.log_target") && value
) {
979 if (log_set_target_from_string(value
) < 0)
980 log_warning("Failed to parse log target '%s'. Ignoring.", value
);
982 } else if (streq(key
, "systemd.log_level") && value
) {
984 if (log_set_max_level_from_string(value
) < 0)
985 log_warning("Failed to parse log level '%s'. Ignoring.", value
);
987 } else if (streq(key
, "systemd.log_color") && value
) {
989 if (log_show_color_from_string(value
) < 0)
990 log_warning("Failed to parse log color setting '%s'. Ignoring.", value
);
992 } else if (streq(key
, "systemd.log_location") && value
) {
994 if (log_show_location_from_string(value
) < 0)
995 log_warning("Failed to parse log location setting '%s'. Ignoring.", value
);
1001 void log_parse_environment(void) {
1004 if (get_ctty_devnr(0, NULL
) < 0)
1005 /* Only try to read the command line in daemons.
1006 We assume that anything that has a controlling
1007 tty is user stuff. */
1008 (void) parse_proc_cmdline(parse_proc_cmdline_item
);
1010 e
= secure_getenv("SYSTEMD_LOG_TARGET");
1011 if (e
&& log_set_target_from_string(e
) < 0)
1012 log_warning("Failed to parse log target '%s'. Ignoring.", e
);
1014 e
= secure_getenv("SYSTEMD_LOG_LEVEL");
1015 if (e
&& log_set_max_level_from_string(e
) < 0)
1016 log_warning("Failed to parse log level '%s'. Ignoring.", e
);
1018 e
= secure_getenv("SYSTEMD_LOG_COLOR");
1019 if (e
&& log_show_color_from_string(e
) < 0)
1020 log_warning("Failed to parse bool '%s'. Ignoring.", e
);
1022 e
= secure_getenv("SYSTEMD_LOG_LOCATION");
1023 if (e
&& log_show_location_from_string(e
) < 0)
1024 log_warning("Failed to parse bool '%s'. Ignoring.", e
);
1027 LogTarget
log_get_target(void) {
1031 int log_get_max_level(void) {
1032 return log_max_level
;
1035 void log_show_color(bool b
) {
1039 bool log_get_show_color(void) {
1043 void log_show_location(bool b
) {
1047 bool log_get_show_location(void) {
1048 return show_location
;
1051 int log_show_color_from_string(const char *e
) {
1054 t
= parse_boolean(e
);
1062 int log_show_location_from_string(const char *e
) {
1065 t
= parse_boolean(e
);
1069 log_show_location(t
);
1073 bool log_on_console(void) {
1074 if (log_target
== LOG_TARGET_CONSOLE
||
1075 log_target
== LOG_TARGET_CONSOLE_PREFIXED
)
1078 return syslog_fd
< 0 && kmsg_fd
< 0 && journal_fd
< 0;
1081 static const char *const log_target_table
[_LOG_TARGET_MAX
] = {
1082 [LOG_TARGET_CONSOLE
] = "console",
1083 [LOG_TARGET_CONSOLE_PREFIXED
] = "console-prefixed",
1084 [LOG_TARGET_KMSG
] = "kmsg",
1085 [LOG_TARGET_JOURNAL
] = "journal",
1086 [LOG_TARGET_JOURNAL_OR_KMSG
] = "journal-or-kmsg",
1087 [LOG_TARGET_SYSLOG
] = "syslog",
1088 [LOG_TARGET_SYSLOG_OR_KMSG
] = "syslog-or-kmsg",
1089 [LOG_TARGET_AUTO
] = "auto",
1090 [LOG_TARGET_SAFE
] = "safe",
1091 [LOG_TARGET_NULL
] = "null"
1094 DEFINE_STRING_TABLE_LOOKUP(log_target
, LogTarget
);
1096 void log_received_signal(int level
, const struct signalfd_siginfo
*si
) {
1097 if (si
->ssi_pid
> 0) {
1098 _cleanup_free_
char *p
= NULL
;
1100 get_process_comm(si
->ssi_pid
, &p
);
1103 "Received SIG%s from PID %"PRIu32
" (%s).",
1104 signal_to_string(si
->ssi_signo
),
1105 si
->ssi_pid
, strna(p
));
1109 signal_to_string(si
->ssi_signo
));
1113 void log_set_upgrade_syslog_to_journal(bool b
) {
1114 upgrade_syslog_to_journal
= b
;
1117 int log_syntax_internal(
1120 const char *config_file
,
1121 unsigned config_line
,
1126 const char *format
, ...) {
1129 char buffer
[LINE_MAX
];
1136 if (_likely_(LOG_PRI(level
) > log_max_level
))
1139 if (log_target
== LOG_TARGET_NULL
)
1145 va_start(ap
, format
);
1146 vsnprintf(buffer
, sizeof(buffer
), format
, ap
);
1150 r
= log_struct_internal(
1153 getpid() == 1 ? "UNIT=%s" : "USER_UNIT=%s", unit
,
1154 LOG_MESSAGE_ID(SD_MESSAGE_INVALID_CONFIGURATION
),
1155 "CONFIG_FILE=%s", config_file
,
1156 "CONFIG_LINE=%u", config_line
,
1157 LOG_MESSAGE("[%s:%u] %s", config_file
, config_line
, buffer
),
1160 r
= log_struct_internal(
1163 LOG_MESSAGE_ID(SD_MESSAGE_INVALID_CONFIGURATION
),
1164 "CONFIG_FILE=%s", config_file
,
1165 "CONFIG_LINE=%u", config_line
,
1166 LOG_MESSAGE("[%s:%u] %s", config_file
, config_line
, buffer
),