| 244 | |
| 245 | |
| 246 | void 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 |
no test coverage detected