#include <MessageLoggerQ.h>
Public Types | |
enum | OpCode { END_THREAD, LOG_A_MESSAGE, CONFIGURE, EXTERN_DEST, SUMMARIZE, JOBREPORT, JOBMODE, SHUT_UP, FLUSH_LOG_Q, GROUP_STATS, FJR_SUMMARY } |
Static Public Member Functions | |
static bool | handshaked (const OpCode &op) |
static bool | ignore (edm::ELseverityLevel const &severity, std::string const &category) |
static MessageLoggerQ * | instance () |
static void | MLqCFG (ParameterSet *p) |
static void | MLqEND () |
static void | MLqEXT (service::NamedDestination *p) |
static void | MLqFLS () |
static void | MLqGRP (std::string *cat_p) |
static void | MLqJOB (std::string *j) |
static void | MLqJRS (std::map< std::string, double > *sum_p) |
static void | MLqLOG (ErrorObj *p) |
static void | MLqMOD (std::string *jm) |
static void | MLqSHT () |
static void | MLqSUM () |
static void | setMLscribe_ptr (boost::shared_ptr< edm::service::AbstractMLscribe > m) |
static void | squelch (std::string const &category) |
static void | standAloneThreshold (std::string const &severity) |
Private Member Functions | |
MessageLoggerQ () | |
MessageLoggerQ (MessageLoggerQ const &) | |
void | operator= (MessageLoggerQ const &) |
~MessageLoggerQ () | |
Static Private Member Functions | |
static void | handshakedCommand (OpCode opcode, void *operand, std::string const &commandMnemonic) |
static void | simpleCommand (OpCode opcode, void *operand) |
Static Private Attributes | |
static boost::shared_ptr < edm::service::AbstractMLscribe > | mlscribe_ptr = obtainStandAloneScribePtr() |
static std::set< std::string > | squelchSet |
static edm::ELseverityLevel | threshold |
Definition at line 25 of file MessageLoggerQ.h.
END_THREAD | |
LOG_A_MESSAGE | |
CONFIGURE | |
EXTERN_DEST | |
SUMMARIZE | |
JOBREPORT | |
JOBMODE | |
SHUT_UP | |
FLUSH_LOG_Q | |
GROUP_STATS | |
FJR_SUMMARY |
Definition at line 29 of file MessageLoggerQ.h.
{ END_THREAD // END , LOG_A_MESSAGE // LOG , CONFIGURE // CFG -- handshaked , EXTERN_DEST // EXT , SUMMARIZE // SUM , JOBREPORT // JOB , JOBMODE // MOD , SHUT_UP // SHT , FLUSH_LOG_Q // FLS -- handshaked , GROUP_STATS // GRP , FJR_SUMMARY // JRS -- handshaked }; // OpCode
MessageLoggerQ::MessageLoggerQ | ( | ) | [private] |
Definition at line 124 of file MessageLoggerQ.cc.
{ }
MessageLoggerQ::~MessageLoggerQ | ( | ) | [private] |
Definition at line 128 of file MessageLoggerQ.cc.
{ }
edm::MessageLoggerQ::MessageLoggerQ | ( | MessageLoggerQ const & | ) | [private] |
bool MessageLoggerQ::handshaked | ( | const OpCode & | op | ) | [static] |
Definition at line 251 of file MessageLoggerQ.cc.
References CONFIGURE, FJR_SUMMARY, and FLUSH_LOG_Q.
Referenced by edm::service::MainThreadMLscribe::runCommand().
{ return ( (op == CONFIGURE) || (op == FLUSH_LOG_Q) || (op == FJR_SUMMARY) ); } // MessageLoggerQ::handshaked(op)
void MessageLoggerQ::handshakedCommand | ( | OpCode | opcode, |
void * | operand, | ||
std::string const & | commandMnemonic | ||
) | [static, private] |
Definition at line 157 of file MessageLoggerQ.cc.
References dtNoiseDBValidation_cfg::cerr, mlscribe_ptr, and cms::Exception::what().
Referenced by MLqCFG(), MLqFLS(), and MLqJRS().
{ // Change Log 10 try { mlscribe_ptr->runCommand(opcode, operand); } catch(edm::Exception& ex) { ex << "\n The preceding exception was thrown in MessageLoggerScribe\n"; ex << "and forwarded to the main thread from the Messages thread."; std::cerr << "exception from MessageLoggerQ::" << commandMnemonic << " - exception what() is \n" << ex.what(); // TODO - get the above text into the what itself throw ex; } } // handshakedCommand
bool MessageLoggerQ::ignore | ( | edm::ELseverityLevel const & | severity, |
std::string const & | category | ||
) | [static] |
Definition at line 265 of file MessageLoggerQ.cc.
References squelchSet, and threshold.
{ if ( severity < threshold ) return true; if ( squelchSet.count(category) > 0 ) return true; return false; }
MessageLoggerQ * MessageLoggerQ::instance | ( | ) | [static] |
Definition at line 133 of file MessageLoggerQ.cc.
References launcher::queue.
{ static MessageLoggerQ queue; return &queue; } // MessageLoggerQ::instance()
void MessageLoggerQ::MLqCFG | ( | ParameterSet * | p | ) | [static] |
Definition at line 197 of file MessageLoggerQ.cc.
References CONFIGURE, and handshakedCommand().
Referenced by edm::service::MessageLogger::MessageLogger().
{ handshakedCommand(CONFIGURE, p, "CFG" ); } // MessageLoggerQ::CFG()
void MessageLoggerQ::MLqEND | ( | ) | [static] |
Definition at line 178 of file MessageLoggerQ.cc.
References END_THREAD, and simpleCommand().
Referenced by run_app(), edm::service::MessageServicePresence::~MessageServicePresence(), and edm::service::SingleThreadMSPresence::~SingleThreadMSPresence().
{ simpleCommand (END_THREAD, (void *)0); } // MessageLoggerQ::END()
void MessageLoggerQ::MLqEXT | ( | service::NamedDestination * | p | ) | [static] |
Definition at line 203 of file MessageLoggerQ.cc.
References EXTERN_DEST, and simpleCommand().
Referenced by ML::MLlog4cplus::MLlog4cplus().
{ simpleCommand (EXTERN_DEST, static_cast<void *>(p)); }
void MessageLoggerQ::MLqFLS | ( | ) | [static] |
Definition at line 228 of file MessageLoggerQ.cc.
References FLUSH_LOG_Q, and handshakedCommand().
Referenced by edm::FlushMessageLog().
{ // The ConfigurationHandshake, developed for synchronous CFG, contains a // place to convey exception information. FLS does not need this, nor does // it need the parameter set, but we are reusing ConfigurationHandshake // rather than reinventing the mechanism. handshakedCommand(FLUSH_LOG_Q, 0, "FLS" ); } // MessageLoggerQ::FLS()
void MessageLoggerQ::MLqGRP | ( | std::string * | cat_p | ) | [static] |
Definition at line 238 of file MessageLoggerQ.cc.
References GROUP_STATS, and simpleCommand().
Referenced by edm::GroupLogStatistics().
{ simpleCommand (GROUP_STATS, static_cast<void *>(cat_p)); } // MessageLoggerQ::GRP()
void MessageLoggerQ::MLqJOB | ( | std::string * | j | ) | [static] |
Definition at line 215 of file MessageLoggerQ.cc.
References JOBREPORT, and simpleCommand().
Referenced by edm::service::MessageLogger::MessageLogger().
{ simpleCommand (JOBREPORT, static_cast<void *>(j)); } // MessageLoggerQ::JOB()
void MessageLoggerQ::MLqJRS | ( | std::map< std::string, double > * | sum_p | ) | [static] |
Definition at line 244 of file MessageLoggerQ.cc.
References FJR_SUMMARY, and handshakedCommand().
Referenced by edm::service::MessageLogger::SummarizeInJobReport().
{ handshakedCommand(FJR_SUMMARY, sum_p, "JRS" ); } // MessageLoggerQ::CFG()
void MessageLoggerQ::MLqLOG | ( | ErrorObj * | p | ) | [static] |
Definition at line 190 of file MessageLoggerQ.cc.
References LOG_A_MESSAGE, and simpleCommand().
Referenced by edm::MessageSender::ErrorObjDeleter::operator()().
{ simpleCommand (LOG_A_MESSAGE, static_cast<void *>(p)); } // MessageLoggerQ::LOG()
void MessageLoggerQ::MLqMOD | ( | std::string * | jm | ) | [static] |
Definition at line 221 of file MessageLoggerQ.cc.
References JOBMODE, and simpleCommand().
Referenced by edm::service::MessageLogger::MessageLogger().
{ simpleCommand (JOBMODE, static_cast<void *>(jm)); } // MessageLoggerQ::MOD()
void MessageLoggerQ::MLqSHT | ( | ) | [static] |
Definition at line 184 of file MessageLoggerQ.cc.
References SHUT_UP, and simpleCommand().
Referenced by edm::HaltMessageLogging().
{ simpleCommand (SHUT_UP, (void *)0); } // MessageLoggerQ::SHT()
void MessageLoggerQ::MLqSUM | ( | ) | [static] |
Definition at line 209 of file MessageLoggerQ.cc.
References simpleCommand(), and SUMMARIZE.
Referenced by edm::service::MessageLogger::jobFailure(), edm::LogStatistics(), and edm::service::MessageLogger::postEndJob().
{ simpleCommand (SUMMARIZE, 0); } // MessageLoggerQ::SUM()
void edm::MessageLoggerQ::operator= | ( | MessageLoggerQ const & | ) | [private] |
void MessageLoggerQ::setMLscribe_ptr | ( | boost::shared_ptr< edm::service::AbstractMLscribe > | m | ) | [static] |
Definition at line 141 of file MessageLoggerQ.cc.
References m.
Referenced by edm::service::MessageServicePresence::MessageServicePresence(), run_app(), edm::service::SingleThreadMSPresence::SingleThreadMSPresence(), edm::service::MessageServicePresence::~MessageServicePresence(), and edm::service::SingleThreadMSPresence::~SingleThreadMSPresence().
{ if (!m) { mlscribe_ptr = obtainStandAloneScribePtr(); } else { mlscribe_ptr = m; } } // MessageLoggerQ::setMLscribe_ptr(m)
void MessageLoggerQ::simpleCommand | ( | OpCode | opcode, |
void * | operand | ||
) | [static, private] |
Definition at line 151 of file MessageLoggerQ.cc.
References mlscribe_ptr.
Referenced by MLqEND(), MLqEXT(), MLqGRP(), MLqJOB(), MLqLOG(), MLqMOD(), MLqSHT(), and MLqSUM().
{ mlscribe_ptr->runCommand(opcode, operand); } // simpleCommand
void MessageLoggerQ::squelch | ( | std::string const & | category | ) | [static] |
Definition at line 262 of file MessageLoggerQ.cc.
References squelchSet.
Referenced by edm::squelchStandAloneMessageCategory().
{ squelchSet.insert(category); }
void MessageLoggerQ::standAloneThreshold | ( | std::string const & | severity | ) | [static] |
Definition at line 259 of file MessageLoggerQ.cc.
References threshold.
Referenced by edm::setStandAloneMessageThreshold().
{ threshold = edm::ELseverityLevel(severity); }
boost::shared_ptr< edm::service::AbstractMLscribe > MessageLoggerQ::mlscribe_ptr = obtainStandAloneScribePtr() [static, private] |
Definition at line 88 of file MessageLoggerQ.h.
Referenced by handshakedCommand(), and simpleCommand().
std::set< std::string > MessageLoggerQ::squelchSet [static, private] |
Definition at line 90 of file MessageLoggerQ.h.
edm::ELseverityLevel MessageLoggerQ::threshold [static, private] |
Definition at line 89 of file MessageLoggerQ.h.
Referenced by ignore(), and standAloneThreshold().