From c39f96c253928e327905c9e6d6b1617995278d43 Mon Sep 17 00:00:00 2001 From: koennecke Date: Mon, 21 Nov 2016 13:37:10 +0100 Subject: [PATCH] Removed some dead code in SCinter Loglisten showed to much stuff, no filtering. Filtering added. --- SCinter.c | 14 -------------- loglisten.c | 5 +++++ 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/SCinter.c b/SCinter.c index 698ab222..283580f0 100644 --- a/SCinter.c +++ b/SCinter.c @@ -294,20 +294,6 @@ int InterpExecute(SicsInterp * self, SConnection * pCon, char *pText) assert(self); assert(pCon); - /* write info to Log - if (pCon->sockHandle >= 0) { - snprintf(pBueffel,1023, "Executing -> %s <- from socket %d", pText, - pCon->sockHandle); - SICSLogWrite(pBueffel, eCommand); - } else { - snprintf(pBueffel,1023, "Executing -> %s <- from dummy socket\n", pText); - SICSLogWrite(pBueffel, eCommand); - } - - TODO: disabled for now. This is a duplication of what is logged in SCInvoke. - - Mark Koennecke, February 2016 - */ if(strstr(pText,tclescape) == pText){ return TclExecFunc(pCon,self,NULL,pText); diff --git a/loglisten.c b/loglisten.c index 111b251a..a7785ceb 100644 --- a/loglisten.c +++ b/loglisten.c @@ -28,6 +28,11 @@ static void LogListenCallback(unsigned int severity, const char *timeStamp, ListenEntry current; int status, cleanupNeeded = 0; + if(logFilter(severity,subsystem,message) == 1) { + return; + } + + status = LLDnodePtr2First(listenerList); while(status != 0){ LLDnodeDataTo(listenerList,¤t);