39 : wildcardLimit(-1), wildcardInterval(-1), wildcardTimespan(-1), tableLimit(-1),
limits(),
counts() {
40 #ifdef ELlimitsTableCONSTRUCTOR_TRACE 41 std::cerr <<
"Constructor for ELlimitsTable\n";
53 #ifdef ELlimitsTableCONSTRUCTOR_TRACE 54 std::cerr <<
"Destructor for ELlimitsTable\n";
66 #ifdef ELlimitsTableATRACE 67 std::cerr <<
"&&&--- adding to limits table: " << xid.
id <<
'\n';
70 ELmap_counts::iterator
c =
counts.find(xid);
74 #ifdef ELlimitsTableATRACE 75 std::cerr <<
"&&& no such entry yet in counts \n";
86 ELmap_limits::iterator
l =
limits.find(xid.
id);
89 lim = (*l).second.limit;
90 ivl = (*l).second.interval;
91 ts = (*l).second.timespan;
111 #ifdef ELlimitsTableATRACE 112 std::cerr <<
"&&& Entry found in limits: limit = " << lim <<
" interval = " << ivl <<
" timespan = " << ts
120 #ifdef ELlimitsTableATRACE 121 std::cerr <<
"&&& Limit taken from severityLimits: " << lim <<
'\n' 122 <<
"&&& Interval taken from severityLimits: " << ivl <<
'\n';
126 #ifdef ELlimitsTableATRACE 127 std::cerr <<
"&&& Limit reset to wildcard limit: " << lim <<
'\n';
132 #ifdef ELlimitsTableATRACE 133 std::cerr <<
"&&& Interval reset to wildcard interval: " << ivl <<
'\n';
136 #ifdef ELlimitsTableATRACE 137 std::cerr <<
"&&& Timespan taken from severityTimespans: " << ts <<
'\n';
141 #ifdef ELlimitsTableATRACE 142 std::cerr <<
"&&& timespan reset to wildcard timespan: " << ts <<
'\n';
155 return (
c ==
counts.end()) ?
true 172 ELmap_counts::iterator
i;
174 (*i).second.limit = -1;
175 (*i).second.n = (*i).second.aggregateN = 0;
191 ELmap_counts::iterator
i;
messagelogger::ELseverityLevel severity
void setLimit(const std::string &id, int n)
void setTimespan(const std::string &id, int n)
void setInterval(const std::string &id, int interval)
constexpr int getLevel() const noexcept
void setTableLimit(int n)
bool add(const ELextendedID &xid)
ELlimitsTable & operator=(const ELlimitsTable &t)
int severityIntervals[messagelogger::ELseverityLevel::nLevels]
int severityTimespans[messagelogger::ELseverityLevel::nLevels]
int severityLimits[messagelogger::ELseverityLevel::nLevels]