Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/bind/dist/bin/named Print syslog errors in one ...



details:   https://anonhg.NetBSD.org/src/rev/d2f0ea82c124
branches:  trunk
changeset: 806699:d2f0ea82c124
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Mar 06 00:44:04 2015 +0000

description:
Print syslog errors in one line, like we do for stderr so that the
duplicate line detection of syslogd can merge them.

diffstat:

 external/bsd/bind/dist/bin/named/main.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (26 lines):

diff -r 9ebb89a2504b -r d2f0ea82c124 external/bsd/bind/dist/bin/named/main.c
--- a/external/bsd/bind/dist/bin/named/main.c   Thu Mar 05 23:46:54 2015 +0000
+++ b/external/bsd/bind/dist/bin/named/main.c   Fri Mar 06 00:44:04 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.16 2015/01/25 15:51:53 christos Exp $       */
+/*     $NetBSD: main.c,v 1.17 2015/03/06 00:44:04 christos Exp $       */
 
 /*
  * Copyright (C) 2004-2014  Internet Systems Consortium, Inc. ("ISC")
@@ -283,12 +283,12 @@
         */
 
        if (ns_g_lctx != NULL) {
-               isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
-                             NS_LOGMODULE_MAIN, ISC_LOG_ERROR,
-                             "%s:%d: unexpected error:", file, line);
+               char fmt[2048];
+               snprintf(fmt, sizeof(fmt),
+                   "%s:%d: unexpected error: %s", file, line, format);
                isc_log_vwrite(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
                               NS_LOGMODULE_MAIN, ISC_LOG_ERROR,
-                              format, args);
+                              fmt, args);
        } else {
                fprintf(stderr, "%s:%d: fatal error: ", file, line);
                vfprintf(stderr, format, args);



Home | Main Index | Thread Index | Old Index