[sheepdog] [PATCH v2] logger: log msg in syslog when log area overun

Liu Yuan namei.unix at gmail.com
Mon Jul 30 09:51:56 CEST 2012


From: Liu Yuan <tailai.ly at taobao.com>

We need this to identify if this happens

Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
---
 lib/logger.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/logger.c b/lib/logger.c
index 5b6d903..5f8a6ab 100644
--- a/lib/logger.c
+++ b/lib/logger.c
@@ -233,6 +233,7 @@ static notrace int log_enqueue(int prio, const char *func, int line, const char
 	if (la->head > la->tail &&
 	    (len + sizeof(struct logmsg)) > ((char *)la->head - (char *)la->tail)) {
 		logdbg(stderr, "enqueue: log area overrun, dropping message\n");
+		syslog(LOG_ERR, "enqueue: log area overrun, dropping message\n");
 
 		if (!la->empty)
 			la->tail = lastmsg;
-- 
1.7.10.2




More information about the sheepdog mailing list