#include <ELcollected.h>
Public Member Functions | |
virtual ELcollected * | clone () const |
ELcollected (const ELsender &sender) | |
ELcollected (const ELcollected &orig) | |
ELcollected (ELoutput *d) | |
virtual bool | log (const edm::ErrorObj &msg) |
virtual | ~ELcollected () |
Protected Member Functions | |
void | emitToken (const ELstring &s, bool nl=false) |
void | emitXid (const ELextendedID &xid) |
void | intoBuf (const ELstring &s) |
Protected Attributes | |
ELstring | buf |
boost::shared_ptr< ELsender > | sender |
Friends | |
class | ELdestControl |
Definition at line 91 of file ELcollected.h.
edm::service::ELcollected::ELcollected | ( | const ELsender & | sender | ) |
edm::service::ELcollected::ELcollected | ( | const ELcollected & | orig | ) |
Definition at line 51 of file ELcollected.cc.
References gather_cfg::cout, edm::service::ELdestination::ignoreMostModules, edm::service::ELdestination::ignoreThese, edm::service::ELdestination::respondToMostModules, and edm::service::ELdestination::respondToThese.
: ELoutput( orig ) , sender ( orig.sender->clone() ) // $$ mf 9/15/00 { #ifdef ELcollectedCONSTRUCTOR_TRACE std::cout << "Copy constructor for ELcollected\n"; #endif ignoreMostModules = orig.ignoreMostModules; respondToThese = orig.respondToThese; respondToMostModules = orig.respondToMostModules; ignoreThese = orig.ignoreThese; } // ELcollected()
edm::service::ELcollected::ELcollected | ( | ELoutput * | d | ) |
edm::service::ELcollected::~ELcollected | ( | ) | [virtual] |
Definition at line 68 of file ELcollected.cc.
References gather_cfg::cout.
{ #ifdef ELcollectedCONSTRUCTOR_TRACE std::cout << "Destructor for ELcollected)\n"; #endif } // ~ELcollected()
ELcollected * edm::service::ELcollected::clone | ( | void | ) | const [virtual] |
Reimplemented from edm::service::ELoutput.
Definition at line 82 of file ELcollected.cc.
References ELcollected().
{ return new ELcollected( *this ); } // clone()
void edm::service::ELcollected::emitToken | ( | const ELstring & | s, |
bool | nl = false |
||
) | [protected, virtual] |
Reimplemented from edm::service::ELoutput.
Definition at line 126 of file ELcollected.cc.
References edm::service::ELoutput::charsOnLine, gather_cfg::cout, intoBuf(), and edm::service::ELdestination::newline.
Referenced by log().
{ #ifdef ELcollected_EMIT_TRACE std::cout << "[][][] in emit: s.length() " << s.length() << "\n"; #endif // A forced newline is something that needs to be transmitted. // We shall insert it as its own item. if (s.length() == 0) { if ( nl ) { intoBuf( newline ); charsOnLine = 0; } return; } // Setting up for indentation if you start with a nweline, or if the length // exceeds column 80, is not done here, it is done on the server. #ifdef ELcollected_EMIT_TRACE std::cout << "[][][] in emit: about to << s to buf: " << s << " \n"; #endif // Place the item into the buffer intoBuf (s); // Accounting for trailing \n is done at the server. // A forced trailing newline is something that needs to be transmitted. // We shall insert it as its own item. if ( nl ) { intoBuf (newline); } #ifdef ELcollected_EMIT_TRACE std::cout << "[][][] in emit: completed \n"; #endif } // emitToken()
void edm::service::ELcollected::emitXid | ( | const ELextendedID & | xid | ) | [protected] |
Definition at line 107 of file ELcollected.cc.
References buf, edm::ELseverityLevel::getLevel(), edm::ELextendedID::id, intoBuf(), edm::ELextendedID::module, edm::ELextendedID::process, edm::ELextendedID::severity, and edm::ELextendedID::subroutine.
Referenced by log().
void edm::service::ELcollected::intoBuf | ( | const ELstring & | s | ) | [protected] |
Definition at line 95 of file ELcollected.cc.
References buf, and asciidump::s.
Referenced by emitToken(), and emitXid().
bool edm::service::ELcollected::log | ( | const edm::ErrorObj & | msg | ) | [virtual] |
Reimplemented from edm::service::ELoutput.
Definition at line 175 of file ELcollected.cc.
References edm::service::ELlimitsTable::add(), buf, gather_cfg::cout, emitToken(), emitXid(), edm::service::ELadministrator::instance(), edm::ErrorObj::items(), edm::service::ELdestination::limits, edm::ELextendedID::module, sender, edm::ELextendedID::severity, edm::service::ELdestination::thisShouldBeIgnored(), edm::service::ELdestination::threshold, edm::service::ELdestination::traceThreshold, edm::service::ELoutput::wantText, edm::service::ELoutput::xid, and edm::ErrorObj::xid().
{ #ifdef ELcollectedTRACE_LOG std::cout << " =:=:=: Log to an ELcollected \n"; #endif xid = msg.xid(); // Save the xid. // See if this message is to be acted upon, and add it to limits table // if it was not already present: // if ( msg.xid().severity < threshold ) return false; if ( thisShouldBeIgnored(xid.module) ) return false; if ( ! limits.add( msg.xid() ) ) return false; #ifdef ELcollectedTRACE_LOG std::cout << " =:=:=: Limits table work done \n"; #endif // start the buffer with the xid emitXid (xid); // #ifdef ELcollectedTRACE_LOG std::cout << " =:=:=: xid emitted \n"; #endif // Provide the context information. The server side will use this to prime // its special context supplier. We will send over all three types of // context, even though probably only 1 or 2 will be needed. emitToken( ELadministrator::instance()-> getContextSupplier().summaryContext()); emitToken( ELadministrator::instance()-> getContextSupplier().context()); emitToken( ELadministrator::instance()-> getContextSupplier().fullContext()); #ifdef ELcollectedTRACE_LOG std::cout << " =:=:=: Context done: \n"; #endif // No prologue separate from what the server will issue. // No serial number of message separate from what the server will issue. // collected each item in the message: // if ( wantText ) { ELlist_string::const_iterator it; for ( it = msg.items().begin(); it != msg.items().end(); ++it ) { #ifdef ELcollectedTRACE_LOG std::cout << " =:=:=: Item: " << *it <<"\n"; #endif emitToken( *it ); } } // DO NOT Provide further identification such as module and subroutine; // the server side will provide that using the xid you have sent it, if // the server side user wants it. // DO NOT provide time stamp; it would duplicate server's stamp! // Provide traceback information: // if ( msg.xid().severity >= traceThreshold ) { emitToken( ELstring("\n") + ELadministrator::instance()->getContextSupplier().traceRoutine() , true ); } else { //else statement added JV:1 emitToken( "", true ); } #ifdef ELcollectedTRACE_LOG std::cout << " =:=:=: Trace routine done: \n"; #endif // Message has been fully processed through emit; now put in an extra // zero, and send out the buffer. // buf += char(0); int nbuf = buf.length(); sender->send ( nbuf, buf.data() ); #ifdef ELcollectedTRACE_LOG std::cout << " =:=:=: log(msg) done: \n"; #endif return true; } // log()
friend class ELdestControl [friend] |
Reimplemented from edm::service::ELoutput.
Definition at line 93 of file ELcollected.h.
ELstring edm::service::ELcollected::buf [protected] |
Definition at line 141 of file ELcollected.h.
boost::shared_ptr<ELsender> edm::service::ELcollected::sender [protected] |
Definition at line 136 of file ELcollected.h.
Referenced by log().