![]() |
![]() |
#include <ErrorLog.h>
Definition at line 51 of file ErrorLog.h.
edm::service::ErrorLog::ErrorLog | ( | ) |
Definition at line 69 of file ErrorLog.cc.
References gather_cfg::cout.
: a( ELadministrator::instance() ) , subroutine( "" ) , module( "" ) , hexTrigger(-1) , spaceAfterInt(false) , discardThreshold (ELzeroSeverity) , discarding (false) , debugVerbosityLevel(0) , debugSeverityLevel(ELinfo) , debugMessageId ("DEBUG") { #ifdef ErrorLogCONSTRUCTOR_TRACE std::cout << "Constructor for ErrorLog\n"; #endif } // ErrorLog()
edm::service::ErrorLog::ErrorLog | ( | const ELstring & | pkgName | ) |
Definition at line 88 of file ErrorLog.cc.
References gather_cfg::cout.
: a( ELadministrator::instance() ) , subroutine( "" ) , module( pkgName ) , hexTrigger(-1) , spaceAfterInt(false) , discardThreshold (ELzeroSeverity) , discarding (false) , debugVerbosityLevel(0) , debugSeverityLevel(ELinfo) , debugMessageId ("DEBUG") { #ifdef ErrorLogCONSTRUCTOR_TRACE std::cout << "Constructor for ErrorLog (with pkgName = " << pkgName << ")\n"; #endif } // ErrorLog()
edm::service::ErrorLog::~ErrorLog | ( | ) | [virtual] |
Definition at line 108 of file ErrorLog.cc.
References gather_cfg::cout.
{ #ifdef ErrorLogCONSTRUCTOR_TRACE std::cout << "Destructor for ErrorLog\n"; #endif } // ~ErrorLog()
Definition at line 269 of file ErrorLog.cc.
References a, gather_cfg::cout, edm::ELunspecified, edm::ErrorObj::emitToken(), edm::service::ELadministrator::msg, and edm::service::ELadministrator::msgIsActive.
Referenced by edm::service::operator<<().
{ #ifdef ErrorLogEMIT_TRACE std::cout << " =:=:=: ErrorLog emit trace: string is: " << s << "\n"; #endif if ( ! a->msgIsActive ) (*this) ( ELunspecified, "..." ); a->msg.emitToken( s ); #ifdef ErrorLogEMIT_TRACE std::cout << " =:=:=: ErrorLog emit trace: return from a->msg.emitToken()\n"; #endif return *this; } // emitToken()
ErrorLog & edm::service::ErrorLog::endmsg | ( | ) |
Definition at line 289 of file ErrorLog.cc.
References a, edm::service::ELadministrator::clearMsg(), gather_cfg::cout, edm::service::ELadministrator::finishMsg(), and edm::service::ELadministrator::msgIsActive.
Referenced by edm::service::endmsg(), and operator()().
{ #ifdef ErrorLogENDMSG_TRACE std::cout << "=:=:=: endmsg () -- msgIsActive = " << a->msgIsActive << std::endl; #endif if ( a->msgIsActive ) { #ifdef ErrorLogENDMSG_TRACE std::cout << "=:=:=: endmsg () -- finishMsg started\n"; #endif a->finishMsg(); #ifdef ErrorLogENDMSG_TRACE std::cout << "=:=:=: endmsg () -- finishMsg completed\n"; #endif a->clearMsg(); } return *this; } // endmsg()
bool edm::service::ErrorLog::getELdestControl | ( | const ELstring & | name, |
ELdestControl & | theDestControl | ||
) | const |
Definition at line 341 of file ErrorLog.cc.
References a, and edm::service::ELadministrator::getELdestControl().
ELstring edm::service::ErrorLog::moduleName | ( | ) | const |
ErrorLog & edm::service::ErrorLog::operator() | ( | edm::ErrorObj & | msg | ) |
Definition at line 180 of file ErrorLog.cc.
References a, edm::service::ELadministrator::abortThreshold(), edm::service::ELadministrator::attach(), benchmark_cfg::cerr, edm::service::ELadministrator::context_, gather_cfg::cout, endmsg(), edm::service::ELadministrator::exitThreshold(), edm::ELseverityLevel::getLevel(), edm::service::ELadministrator::highSeverity_, edm::ELextendedID::module, edm::service::possiblyAbOrEx(), edm::service::ELadministrator::process(), edm::ELextendedID::process, edm::ErrorObj::setModule(), edm::ErrorObj::setProcess(), edm::ErrorObj::setReactedTo(), edm::ErrorObj::setSubroutine(), edm::ELextendedID::severity, edm::service::ELadministrator::severityCounts_, edm::service::ELadministrator::sinks(), subroutine, edm::ELextendedID::subroutine, and edm::ErrorObj::xid().
{ #ifdef ErrorLogENDMSG_TRACE std::cout << "=:=:=: precautionary endmsg called from operator() (msg) \n"; #endif endmsg(); // precautionary // ----- will we need to poke/restore info into the message? // bool updateProcess ( msg.xid().process .length() == 0 ); bool updateModule ( msg.xid().module .length() == 0 ); bool updateSubroutine( msg.xid().subroutine.length() == 0 ); // ----- poke, if needed: // if ( updateProcess ) msg.setProcess ( a->process() ); if ( updateModule ) msg.setModule ( module ); if ( updateSubroutine ) msg.setSubroutine( subroutine ); // severity level statistics keeping: // $$ mf 6/7/01 int lev = msg.xid().severity.getLevel(); ++ a->severityCounts_[lev]; if ( lev > a->highSeverity_.getLevel() ) a->highSeverity_ = msg.xid().severity; a->context_->editErrorObj( msg ); // ----- send the message to each destination: // if (a->sinks().begin() == a->sinks().end()) { std::cerr << "\nERROR LOGGED WITHOUT DESTINATION!\n"; std::cerr << "Attaching destination \"cerr\" to ELadministrator by default\n" << std::endl; a->attach(ELoutput(std::cerr)); } std::list<boost::shared_ptr<ELdestination> >::iterator d; for ( d = a->sinks().begin(); d != a->sinks().end(); ++d ) if ( (*d)->log( msg ) ) msg.setReactedTo ( true ); possiblyAbOrEx ( msg.xid().severity.getLevel(), a->abortThreshold().getLevel(), a->exitThreshold().getLevel() ); // $$ mf 3/17/04 // ----- restore, if we poked above: // if ( updateProcess ) msg.setProcess( "" ); if ( updateModule ) msg.setModule( "" ); if ( updateSubroutine ) msg.setSubroutine( "" ); return *this; } // operator()( )
ErrorLog & edm::service::ErrorLog::operator() | ( | const ELseverityLevel & | sev, |
const ELstring & | id | ||
) |
Definition at line 116 of file ErrorLog.cc.
References a, gather_cfg::cout, discarding, discardThreshold, endmsg(), edm::ELseverityLevel::getName(), edm::service::ELadministrator::msg, edm::service::ELadministrator::msgIsActive, edm::service::ELadministrator::process(), edm::ErrorObj::set(), edm::ErrorObj::setModule(), edm::ErrorObj::setProcess(), edm::ErrorObj::setReactedTo(), edm::ErrorObj::setSubroutine(), and subroutine.
{ if ( sev < discardThreshold ) { discarding = true; return *this; } discarding = false; #ifdef ErrorLogENDMSG_TRACE std::cout << "=:=:=: precautionary endmsg ( " << sev.getName() << ", " << id << ")\n"; #endif endmsg(); // precautionary // ----- form ErrorObj for this new message: // a->msgIsActive = true; a->msg.set ( sev, id ); a->msg.setProcess ( a->process() ); a->msg.setModule ( module ); a->msg.setSubroutine( subroutine ); a->msg.setReactedTo ( false ); return *this; } // operator()( sev, id )
ErrorLog& edm::service::ErrorLog::operator() | ( | int | debugLevel | ) | [inline] |
ErrorLog & edm::service::ErrorLog::operator() | ( | int | nbytes, |
char * | data | ||
) |
Definition at line 250 of file ErrorLog.cc.
References edm::service::ELrecv().
Definition at line 257 of file ErrorLog.cc.
References gather_cfg::cout, discarding, and f.
{ #ifdef ErrorLogOUTPUT_TRACE std::cout << "=:=:=: ErrorLog output trace: f at " << std::hex << f << std::endl; #endif if (discarding) return *this; f( *this ); return *this; } // operator<<()
void edm::service::ErrorLog::setDebugMessages | ( | ELseverityLevel | sev, |
ELstring | id | ||
) |
Definition at line 336 of file ErrorLog.cc.
References debugMessageId, and debugSeverityLevel.
Referenced by edm::service::ELtsErrorLog::setDebugMessages().
{ debugSeverityLevel = sev; debugMessageId = id; }
void edm::service::ErrorLog::setDebugVerbosity | ( | int | debugVerbosity | ) |
Definition at line 332 of file ErrorLog.cc.
References BeamSplash_cfg::debugVerbosity, and debugVerbosityLevel.
Referenced by edm::service::ELtsErrorLog::setDebugVerbosity().
ELseverityLevel edm::service::ErrorLog::setDiscardThreshold | ( | ELseverityLevel | sev | ) |
Definition at line 326 of file ErrorLog.cc.
References discardThreshold.
Referenced by edm::service::ELtsErrorLog::setDiscardThreshold().
{ ELseverityLevel oldSev = discardThreshold; discardThreshold = sev; return oldSev; }
int edm::service::ErrorLog::setHexTrigger | ( | int | trigger | ) |
Definition at line 320 of file ErrorLog.cc.
References hexTrigger.
Referenced by edm::service::ELtsErrorLog::setHexTrigger().
{ int oldTrigger = hexTrigger; hexTrigger = trigger; return oldTrigger; }
void edm::service::ErrorLog::setModule | ( | const ELstring & | modName | ) |
Definition at line 236 of file ErrorLog.cc.
Referenced by edm::service::ELrecv(), edm::service::ELtsErrorLog::setModule(), edm::service::ELtsErrorLog::setPackage(), and setPackage().
{ module = modName; } // setModule()
void edm::service::ErrorLog::setPackage | ( | const ELstring & | pkgName | ) |
Definition at line 243 of file ErrorLog.cc.
References setModule().
{ setModule( pkgName ); } // setPackage()
bool edm::service::ErrorLog::setSpaceAfterInt | ( | bool | space = true | ) |
Definition at line 314 of file ErrorLog.cc.
References spaceAfterInt, and cond::rpcobtemp::temp.
{ bool temp = spaceAfterInt; spaceAfterInt = space; return temp; }
void edm::service::ErrorLog::setSubroutine | ( | const ELstring & | subName | ) |
Definition at line 149 of file ErrorLog.cc.
References subroutine.
Referenced by edm::service::ELrecv(), and edm::service::ELtsErrorLog::setSubroutine().
{ subroutine = subName; } // setSubroutine()
ELstring edm::service::ErrorLog::subroutineName | ( | ) | const |
friend class ELtsErrorLog [friend] |
Definition at line 53 of file ErrorLog.h.
ELadministrator* edm::service::ErrorLog::a [protected] |
Definition at line 121 of file ErrorLog.h.
Referenced by emitToken(), endmsg(), getELdestControl(), and operator()().
Definition at line 133 of file ErrorLog.h.
Referenced by setDebugMessages().
Definition at line 132 of file ErrorLog.h.
Referenced by setDebugMessages().
Definition at line 131 of file ErrorLog.h.
Referenced by setDebugVerbosity().
Definition at line 130 of file ErrorLog.h.
Referenced by edm::service::ELtsErrorLog::initiateMsg(), edm::service::ELtsErrorLog::item(), operator()(), edm::service::operator<<(), and operator<<().
Definition at line 129 of file ErrorLog.h.
Referenced by edm::service::ELtsErrorLog::initiateMsg(), operator()(), and setDiscardThreshold().
Definition at line 127 of file ErrorLog.h.
Referenced by edm::service::ELtsErrorLog::item(), edm::service::operator<<(), and setHexTrigger().
ELstring edm::service::ErrorLog::module [private] |
Definition at line 125 of file ErrorLog.h.
Referenced by edm::service::ELtsErrorLog::initiateMsg(), moduleName(), and edm::service::ELtsErrorLog::pokeMsg().
Definition at line 128 of file ErrorLog.h.
Referenced by edm::service::operator<<(), and setSpaceAfterInt().
ELstring edm::service::ErrorLog::subroutine [private] |
Definition at line 124 of file ErrorLog.h.
Referenced by edm::service::ELtsErrorLog::initiateMsg(), operator()(), edm::service::ELtsErrorLog::pokeMsg(), setSubroutine(), and subroutineName().