Made all sub systems for logging lower case

Log filtering is now based on an array of severitys per subsystem
Added a LogIS call which takes an integer for the subsystem
Added a LogTS call which allows to specify a user supplied time stamp
This commit is contained in:
2016-03-08 11:36:29 +01:00
parent 40382b2b8c
commit 5a388ab741
6 changed files with 347 additions and 152 deletions

View File

@ -829,7 +829,7 @@ static void testAndWriteLog(SConnection * self, char *buffer, int iOut)
Log(ERROR,"dev","%s",buffer);
break;
case eStatus:
Log(DEBUG,"IO","%s",buffer);
Log(DEBUG,"io","%s",buffer);
break;
case eEvent:
if(strstr(buffer,"ERROR") != NULL){
@ -1707,10 +1707,15 @@ int SCInvoke(SConnection * self, SicsInterp * pInter, char *pCommand)
return 0;
}
strlcpy(pCopy->deviceID, pBueffel, SCDEVIDLEN);
if(SCGetRights(self) > usUser){
Log(DEBUG,"com","%s:in:%s", ConID(self),pCommand);
} else {
Log(INFO,"com", "%s:in:%s", ConID(self),pCommand);
/*
do not log the log command; defeats log control
*/
if(strstr(pCommand,"log ") == NULL) {
if(SCGetRights(self) > usUser){
Log(DEBUG,"com","%s:in:%s", ConID(self),pCommand);
} else {
Log(INFO,"com", "%s:in:%s", ConID(self),pCommand);
}
}
iRet = InterpExecute(pInter, pCopy, pCommand);
SCDeleteConnection(pCopy);