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:
16
scan.c
16
scan.c
@ -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 */
|
||||
|
Reference in New Issue
Block a user