Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Utilities/EPNMonitoring/src/EPNstderrMonitor.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ struct fileMon {
std::string name;
unsigned int nLines = 0;
unsigned int nBytes = 0;
bool stopped = false;

fileMon(const std::string& path, const std::string& filename);
};
Expand Down Expand Up @@ -166,6 +167,9 @@ void EPNMonitor::thread()
std::string line;
for (auto fit = mFiles.begin(); fit != mFiles.end(); fit++) {
auto& f = fit->second;
if (f.stopped) {
continue;
}
auto& file = f.file;
file.clear();
do {
Expand All @@ -187,7 +191,7 @@ void EPNMonitor::thread()
nBytes += line.size();
if (f.nLines >= MAX_LINES_FILE || f.nBytes >= MAX_BYTES_FILE) {
sendLog(f.name, "Exceeded log size for process " + f.name + " (" + std::to_string(f.nLines) + " lines, " + std::to_string(f.nBytes) + " bytes), not reporting any more errors from this file...");
fit = mFiles.erase(fit);
f.stopped = true;
break;
}
if (nLines >= MAX_LINES_TOTAL || nBytes >= MAX_BYTES_TOTAL) {
Expand Down