114 std::cerr <<
"Administrator process set to \"" << process <<
"\"\n";
164 boost::shared_ptr<ELdestination>
dest(sink.
clone());
172 boost::shared_ptr<ELdestination>
dest(sink.
clone());
282 std::ostringstream os;
283 os <<
"msgexit - MessageLogger requested to exit with status " <<
s;
289 std::ostringstream os;
290 os <<
"msgabort - MessageLogger requested to abort";
296 if (s < a && s < e)
return;
316 #ifdef ELadTRACE_FINISH
317 std::cerr <<
"=:=:=: finshMsg() - lev = " << lev <<
"\n";
322 #ifdef ELadTRACE_FINISH
323 std::cerr <<
"=:=:=: finshMsg() returns from editErrorObj( msg ) \n";
326 std::list<boost::shared_ptr<ELdestination> >::iterator d;
328 #ifdef ELadTRACE_FINISH
332 std::cerr <<
"\nERROR LOGGED WITHOUT DESTINATION!\n";
333 std::cerr <<
"Attaching destination \"cerr\" to ELadministrator by default\n\n";
335 this->
sinks().push_back(dest);
338 #ifdef ELadTRACE_FINISH
339 std::cerr <<
" =:=:=: log(msg) for a destination number "
340 << ++destCounter <<
" called ... \n";
342 mrt = (*d)->log(
msg );
343 #ifdef ELadTRACE_FINISH
344 std::cerr <<
" =:=:=: log(msg) for a destination returned " << mrt <<
"\n";
373 std::list<boost::shared_ptr<ELdestination> >::iterator d;
375 (*d)->threshold = sev;
382 std::list<boost::shared_ptr<ELdestination> >::iterator d;
384 (*d)->limits.setLimit(
id, limit );
392 std::list<boost::shared_ptr<ELdestination> >::iterator d;
393 for ( d = sinks().
begin(); d != sinks().end(); ++d )
394 (*d)->limits.setInterval( sev, interval );
400 std::list<boost::shared_ptr<ELdestination> >::iterator d;
402 (*d)->limits.setInterval(
id, interval );
409 std::list<boost::shared_ptr<ELdestination> >::iterator d;
411 (*d)->limits.setLimit( sev, limit );
418 std::list<boost::shared_ptr<ELdestination> >::iterator d;
420 (*d)->limits.setTimespan(
id, seconds );
427 std::list<boost::shared_ptr<ELdestination> >::iterator d;
429 (*d)->limits.setTimespan( sev, seconds );
436 std::list<boost::shared_ptr<ELdestination> >::iterator d;
444 std::list<boost::shared_ptr<ELdestination> >::iterator d;
509 , msgIsActive (
false )
512 #ifdef ELadministratorCONSTRUCTOR_TRACE
513 std::cerr <<
"ELadminstrator constructor\n";
527 #ifdef ELadministratorCONSTRUCTOR_TRACE
528 std::cerr <<
"~ELadminDestroyer: Deleting admin_\n";
545 #ifdef ELadministratorCONSTRUCTOR_TRACE
546 std::cerr <<
"ELadministrator Destructor\n";
const ELseverityLevel & highSeverity() const
void setProcess(const ELstring &process)
virtual ~ELemptyContextSupplier()
const ELcontextSupplier & getContextSupplier() const
ELstring swapProcess(const ELstring &process)
virtual ELstring context() const
std::list< boost::shared_ptr< ELdestination > > & sinks()
int severityCounts_[ELseverityLevel::nLevels]
void setThresholds(const ELseverityLevel &sev)
std::map< ELstring, boost::shared_ptr< ELdestination > > attachedDestinations
ELadminDestroyer(ELadministrator *ad=0)
static ELemptyContextSupplier emptyContext
void setExitThreshold(const ELseverityLevel &sev)
ELslProxy< ELhighestSeverityGen > const ELhighestSeverity
const ELstring & process() const
void setIntervals(const ELstring &id, int interval)
void resetSeverityCount()
void setLimits(const ELstring &id, int limit)
virtual void setReactedTo(bool r)
static ELadministrator * instance_
const ELextendedID & xid() const
ELslProxy< ELzeroSeverityGen > const ELzeroSeverity
virtual ELemptyContextSupplier * clone() const
virtual ~ELadministrator()
ELcontextSupplier & swapContextSupplier(ELcontextSupplier &cs)
ELseverityLevel highSeverity_
void setTimespans(const ELstring &id, int seconds)
bool getELdestControl(const ELstring &name, ELdestControl &theControl)
boost::shared_ptr< ELcontextSupplier > context_
virtual ELstring summaryContext() const
std::list< boost::shared_ptr< ELdestination > > sinks_
ELseverityLevel abortThreshold_
virtual ELdestination * clone() const =0
static std::string from(" from ")
void setAbortThreshold(const ELseverityLevel &sev)
static ELadministrator * instance()
static void possiblyAbortOrExit(int s, int a, int e)
void setContextSupplier(const ELcontextSupplier &supplier)
virtual ELcontextSupplier * clone() const =0
int severityCounts(int lev) const
int severityCount(const ELseverityLevel &sev) const
ELcontextSupplier & context() const
virtual ELstring fullContext() const
void setELadmin(ELadministrator *ad)
static void msgexit(int s)
ELdestControl attach(const ELdestination &sink)
const ELseverityLevel & exitThreshold() const
ELseverityLevel checkSeverity()
ELseverityLevel exitThreshold_
const ELseverityLevel & abortThreshold() const