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:
15
conman.c
15
conman.c
@ -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);
|
||||
|
Reference in New Issue
Block a user