This is the first working version of the new logging system. Some work

in fine tuning still needs to be done. But is reasonably OK now.
This commit is contained in:
2016-02-11 13:40:31 +01:00
parent b1cda3f579
commit 66466c1c0f
56 changed files with 420 additions and 1845 deletions

16
scan.c
View File

@ -1201,10 +1201,10 @@ static int ScanInterest(int iEvent, void *pEventData, void *pUser)
}
if (iEvent == SCANSTART) {
SCWrite(pCon, "NewScan", eLog);
SCWrite(pCon, "NewScan", eEvent);
return 1;
} else if (iEvent == SCANEND) {
SCWrite(pCon, "ScanEnd", eLog);
SCWrite(pCon, "ScanEnd", eEvent);
return 1;
} else if (iEvent == SCANPOINT) {
/* allocate space */
@ -1231,7 +1231,7 @@ static int ScanInterest(int iEvent, void *pEventData, void *pUser)
strcat(pPtr, "}");
oldWrite = SCGetWriteFunc(pCon);
SCSetWriteFunc(pCon, SCOnlySockWrite);
SCWrite(pCon, pPtr, eLog);
SCWrite(pCon, pPtr, eEvent);
SCSetWriteFunc(pCon, oldWrite);
free(lData);
free(pPtr);
@ -1264,10 +1264,10 @@ static int ScanDynInterest(int iEvent, void *pEventData, void *pUser)
}
if (iEvent == SCANSTART) {
SCWrite(pCon, "NewScan", eLog);
SCWrite(pCon, "NewScan", eEvent);
return 1;
} else if (iEvent == SCANEND) {
SCWrite(pCon, "ScanEnd", eLog);
SCWrite(pCon, "ScanEnd", eEvent);
return 1;
} else if (iEvent == SCANPOINT) {
i = self->iCounts - 1;
@ -1287,7 +1287,7 @@ static int ScanDynInterest(int iEvent, void *pEventData, void *pUser)
}
snprintf(pBueffel, 255, "%s.scanpoint = {%d %f %ld}",
self->objectName, i, fVal, lVal);
SCWrite(pCon, pBueffel, eLog);
SCWrite(pCon, pBueffel, eEvent);
}
return 1;
}
@ -1315,10 +1315,10 @@ static int ScanUUInterest(int iEvent, void *pEventData, void *pUser)
}
if (iEvent == SCANSTART) {
SCWrite(pCon, "NewScan", eLog);
SCWrite(pCon, "NewScan", eEvent);
return 1;
} else if (iEvent == SCANEND) {
SCWrite(pCon, "ScanEnd", eLog);
SCWrite(pCon, "ScanEnd", eEvent);
return 1;
} else if (iEvent == SCANPOINT) {
/* allocate space */