-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVectors.cpp
More file actions
18 lines (12 loc) · 1.18 KB
/
Vectors.cpp
File metadata and controls
18 lines (12 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "Vectors.h"
const std::vector<text_t> Vectors::logIdentifiers = { "INFO ", "WARNING ", "ERROR ", "DEBUG ", "CRITICAL","SYSTEM ", "NETWORK ", "SECURITY" };
const std::vector<text_t> Vectors::logMessages = { "Temperature reading normal","Memory usage is above expected threshold","Sensor disconnected unexpectedly","Battery level is critically low","Voltage spike detected on main line","Network latency rising","Unauthorized access attempt detected","System clock drift observed","File read/write operation failed","Thread pool reaching maximum load","Cache miss rate increased","Database connection lost","Watchdog timer triggered","Firmware integrity check failed","Power supply unstable","I/O device not responding","Stack usage unusually high","Background process terminated","Packet loss detected","Resource allocation timeout" };
text_t Vectors::generateLog() {
{
std::unique_lock<std::mutex> lock(_MUTEX);
value_t _IDFINDEX = rand() % logIdentifiers.size();
value_t _MSGINDEX = rand() % logMessages.size();
return "log : [" + logIdentifiers[_IDFINDEX] + " : " + logMessages[_MSGINDEX] + "]";
}
_CONDVAR.notify_all();
}