MCPcopy Create free account
hub / github.com/dobin/RedEdr / SaveToFile

Method SaveToFile

RedEdr/event_processor.cpp:246–256  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

244
245
246void EventProcessor::SaveToFile() {
247 try {
248 std::string data = GetAllAsJson();
249 std::string filename = "C:\\RedEdr\\Data\\" + get_time_for_file() + ".events.json";
250 write_file(filename, data);
251 LOG_A(LOG_INFO, "EventProcessor: Saved events to %s", filename.c_str());
252 }
253 catch (const std::exception& e) {
254 LOG_A(LOG_ERROR, "EventProcessor: Error saving events to file: %s", e.what());
255 }
256}
257
258
259// Module functions

Callers 1

WebserverThreadFunction · 0.80

Calls 4

get_time_for_fileFunction · 0.85
write_fileFunction · 0.85
LOG_AFunction · 0.70
whatMethod · 0.45

Tested by

no test coverage detected