From 53ce7dc58405d9b064900152c2203791e6117048 Mon Sep 17 00:00:00 2001 From: Douglas Clowes Date: Thu, 29 Nov 2012 12:47:21 +1100 Subject: [PATCH] Reduce noise in log files when using the JSON protocol --- protocol.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/protocol.c b/protocol.c index a6226c17..083fb9bd 100644 --- a/protocol.c +++ b/protocol.c @@ -695,9 +695,11 @@ int SCWriteJSON_String(SConnection * pCon, char *pBuffer, int iOut) } else { iRet = 0; } - snprintf(pBueffel,sizeof(pBueffel)-1, "Next line intended for socket: %d", iRet); - SICSLogWrite(pBueffel, eInternal); - SICSLogWrite(pBuffer, iOut); + if (pCon->iMacro != 1) { + snprintf(pBueffel,sizeof(pBueffel)-1, "Next line intended for socket: %d", iRet); + SICSLogWrite(pBueffel, eInternal); + SICSLogWrite(pBuffer, iOut); + } /* write to commandlog if user or manager privilege */ if (SCGetRights(pCon) <= usUser) {