[Patch 09/12] tabled: drop double prefixing

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

 



On Fedora 14, the following is seen in syslog:

Apr 17 19:58:52 niphredil tabled: tabled: connecting to site
 hitlain.zaitcev.lan:8083: No route to host
Apr 17 19:58:56 niphredil tabled: tabled: DB_ENV->rep_elect:WARNING:
 nvotes (1) is sub-majority with nsites (2)

Drop the extra prefix, it only wastes screen space.

Signed-off-by: Pete Zaitcev <zaitcev@xxxxxxxxxx>

---
 lib/tdb.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

commit eb60e6e5c97fe316d23b9b21ba020bca924e879e
Author: Master <zaitcev@xxxxxxxxxxxxxxxxxx>
Date:   Sat Apr 17 20:31:56 2010 -0600

    Fix double tagging in syslog.

diff --git a/lib/tdb.c b/lib/tdb.c
index cd65371..12ff231 100644
--- a/lib/tdb.c
+++ b/lib/tdb.c
@@ -38,7 +38,12 @@ enum {
 
 static void db4syslog(const DB_ENV *dbenv, const char *errpfx, const char *msg)
 {
-	syslog(LOG_WARNING, "%s: %s", errpfx, msg);
+	/*
+	 * Since we use syslog, we discard the prefix set in tdb_init,
+	 * because syslog adds our own prefix too. The errpfx would be
+	 * useful if we weren't dumping to syslog here.
+	 */
+	syslog(LOG_WARNING, "%s", msg);
 }
 
 static int buckets_owner_idx(DB *secondary, const DBT *pkey, const DBT *pdata,
--
To unsubscribe from this list: send the line "unsubscribe hail-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Fedora Clound]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux