|
|
@@ -91,8 +91,8 @@ void DiscLogger::myTask() { |
|
|
|
//// snfScanData /////////////////////////////////////////////////////////////// |
|
|
|
|
|
|
|
snfScanData::snfScanData(int ScanHorizon) : // How to create. |
|
|
|
FilteredData(ScanHorizon, 0), // Allocate the Filtered Data buffer. |
|
|
|
ReadyToClear(true) { // Make sure the clear will happen. |
|
|
|
ReadyToClear(true), // Make sure initial clear will happen. |
|
|
|
FilteredData(ScanHorizon, 0) { // Allocate the Filtered Data buffer.
|
|
|
|
clear(); // Start with no data. |
|
|
|
} |
|
|
|
|
|
|
@@ -225,18 +225,19 @@ msclock IntervalTimer::Elapsed() { |
|
|
|
const ThreadType snfLOGmgr::Type("snfLOGmgr"); // The thread's type. |
|
|
|
|
|
|
|
snfLOGmgr::snfLOGmgr() : // Constructor for the LOG manager |
|
|
|
Thread(snfLOGmgr::Type, "Log Manager"), // snfLOGmgr Type and Name. |
|
|
|
Thread(snfLOGmgr::Type, "Log Manager"), // snfLOGmgr Type and Name.
|
|
|
|
Configured(false), // Not yet configured. |
|
|
|
TimeToDie(false), // Not yet time to die.
|
|
|
|
PeekEnableCounter(0), // No peeking yet.
|
|
|
|
SampleEnableCounter(0), // No sampling yet.
|
|
|
|
myNETmgr(NULL), // No NET mgr yet.
|
|
|
|
myGBUdb(NULL), // No GBUdb yet.
|
|
|
|
NewerRulebaseIsAvailable(false), // No newer rulebase yet.
|
|
|
|
SecondStatusLogger("Second Status Logger"), // Lazy writer for Second status. |
|
|
|
MinuteStatusLogger("Minute Status Logger"), // Lazy writer for Minute status. |
|
|
|
HourStatusLogger("Hour Status Logger"), // Lazy writer for Hour status. |
|
|
|
XMLScanLogger("XML Scan Logger"), // Lazy writer for XML Scan log. |
|
|
|
ClassicScanLogger("Classic Scan Logger"), // Lazy writer for Classic Scan log. |
|
|
|
PeekEnableCounter(0), |
|
|
|
SampleEnableCounter(0), |
|
|
|
myNETmgr(NULL), |
|
|
|
myGBUdb(NULL), |
|
|
|
NewerRulebaseIsAvailable(false), |
|
|
|
TimeToDie(false) { |
|
|
|
ClassicScanLogger("Classic Scan Logger") { // Lazy writer for Classic Scan log. |
|
|
|
StartupTime = Timestamp(); // Record when did we start. |
|
|
|
CurrentCounters = &CounterPackA; // Assign the active CounterPack. |
|
|
|
ReportingCounters = &CounterPackB; // Assign the reporting CounterPack. |
|
|
@@ -1736,7 +1737,7 @@ string snfLOGmgr::Timestamp(time_t t) { |
|
|
|
char TimestampBfr[20]; // Create a small buffer. |
|
|
|
tm* gmt; // Get a ptr to a tm structure. |
|
|
|
gmt = gmtime(&t); // Fill it with UTC. |
|
|
|
sprintf(TimestampBfr,"%04d%02d%02d%02d%02d%02d\0", // Format yyyymmddhhmmss |
|
|
|
sprintf(TimestampBfr,"%04d%02d%02d%02d%02d%02d", // Format yyyymmddhhmmss |
|
|
|
gmt->tm_year+1900, |
|
|
|
gmt->tm_mon+1, |
|
|
|
gmt->tm_mday, |
|
|
@@ -1757,7 +1758,7 @@ string snfLOGmgr::LocalTimestamp(time_t t) { |
|
|
|
char TimestampBfr[20]; // Create a small buffer. |
|
|
|
tm* localt; // Get a ptr to a tm structure. |
|
|
|
localt = localtime(&t); // Fill it with local time. |
|
|
|
sprintf(TimestampBfr,"%04d%02d%02d%02d%02d%02d\0", // Format yyyymmddhhmmss |
|
|
|
sprintf(TimestampBfr,"%04d%02d%02d%02d%02d%02d", // Format yyyymmddhhmmss |
|
|
|
localt->tm_year+1900, |
|
|
|
localt->tm_mon+1, |
|
|
|
localt->tm_mday, |