LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
|
#include "ELdestination.h"
Classes | |
struct | Category |
struct | CategoryParams |
struct | Config |
class | MsgFormatSettings |
class | MsgStatistics |
struct | StatsCount |
struct | XidLimiter |
Public Types | |
enum | flag_enum { NO_LINE_BREAKS, TIMESTAMP, MILLISECOND, MODULE, SUBROUTINE, TEXT, SOME_CONTEXT, SERIAL, FULL_CONTEXT, TIME_SEPARATE, EPILOGUE_SEPARATE, NFLAGS } |
Public Member Functions | |
virtual | ~ELdestination () noexcept=default |
ELdestination (Config const &) | |
ELdestination (ELdestination const &)=delete | |
ELdestination (ELdestination &&)=delete | |
ELdestination & | operator= (ELdestination const &)=delete |
ELdestination & | operator= (ELdestination &&)=delete |
void | setThreshold (ELseverityLevel sv) |
virtual void | log (mf::ErrorObj &) |
virtual void | finish () |
virtual void | summary () |
Protected Member Functions | |
std::string | summarizeContext (std::string const &) |
void | emitToken (std::ostream &os, std::string const &s, bool nl=false, bool preambleMode=false) |
std::string | formSummary () |
bool | skipMsg (ELextendedID const &) |
void | resetLimiters () |
void | resetMsgCounters () |
virtual void | fillPrefix (std::ostringstream &, mf::ErrorObj const &msg) |
virtual void | fillUsrMsg (std::ostringstream &, mf::ErrorObj const &msg) |
virtual void | fillSuffix (std::ostringstream &, mf::ErrorObj const &msg) |
virtual void | routePayload (std::ostringstream const &, mf::ErrorObj const &msg) |
virtual void | flush () |
Protected Attributes | |
ELseverityLevel | threshold_ |
MsgFormatSettings | format_ |
int | defaultLimit_ |
int | defaultReportEvery_ |
int | defaultTimespan_ |
std::map< std::string const, CategoryParams > | categoryParams_ |
std::map< ELextendedID const, XidLimiter > | xidLimiters_ |
std::map< ELextendedID const, StatsCount > | statsMap_ |
bool | outputStatistics_ {false} |
bool | updatedStats_ {false} |
bool | reset_ {false} |
Private Attributes | |
std::size_t | charsOnLine_ {} |
Definition at line 25 of file ELdestination.h.
Enumerator | |
---|---|
NO_LINE_BREAKS | |
TIMESTAMP | |
MILLISECOND | |
MODULE | |
SUBROUTINE | |
TEXT | |
SOME_CONTEXT | |
SERIAL | |
FULL_CONTEXT | |
TIME_SEPARATE | |
EPILOGUE_SEPARATE | |
NFLAGS |
Definition at line 30 of file ELdestination.h.
|
virtualdefaultnoexcept |
mf::service::ELdestination::ELdestination | ( | Config const & | pset | ) |
Definition at line 285 of file ELdestination.cc.
References evd::details::begin(), mf::detail::bold_fontify(), categoryParams_, charsOnLine_, defaultLimit_, defaultReportEvery_, defaultTimespan_, e, evd::details::end(), format_, fhicl::ParameterSet::get_if_present(), max, outputStatistics_, reset_, s, statsMap_, mf::service::ELdestination::Config::threshold, updatedStats_, fhicl::detail::validationException::what(), and xidLimiters_.
|
delete |
|
delete |
|
protected |
Definition at line 408 of file ELdestination.cc.
References charsOnLine_, format_, art::detail::indent(), mf::service::ELdestination::MsgFormatSettings::lineLength, and s.
Referenced by mf::service::ELostreamOutput::ELostreamOutput(), fillPrefix(), fillSuffix(), and fillUsrMsg().
|
protectedvirtual |
Reimplemented in mfplugins::ELsyslog.
Definition at line 462 of file ELdestination.cc.
References charsOnLine_, mf::ErrorObj::context(), emitToken(), EPILOGUE_SEPARATE, format_, mf::ErrorObj::idOverflow(), mf::ErrorObj::is_verbatim(), MODULE, s, mf::ErrorObj::serial(), SERIAL, SOME_CONTEXT, SUBROUTINE, TIME_SEPARATE, TIMESTAMP, mf::ErrorObj::timestamp(), mf::service::ELdestination::MsgFormatSettings::timestamp(), mf::service::ELdestination::MsgFormatSettings::want(), and mf::ErrorObj::xid().
Referenced by log().
|
protectedvirtual |
Reimplemented in mfplugins::ELsyslog.
Definition at line 552 of file ELdestination.cc.
References emitToken(), format_, mf::ErrorObj::is_verbatim(), NO_LINE_BREAKS, and mf::service::ELdestination::MsgFormatSettings::want().
Referenced by log().
|
protectedvirtual |
Reimplemented in mfplugins::ELsyslog.
Definition at line 525 of file ELdestination.cc.
References emitToken(), mf::ErrorObj::filename(), format_, mf::ErrorObj::is_verbatim(), mf::ErrorObj::items(), mf::ErrorObj::lineNumber(), NO_LINE_BREAKS, s, TEXT, util::flags::to_string(), and mf::service::ELdestination::MsgFormatSettings::want().
Referenced by mfplugins::ELsyslog::fillUsrMsg(), and log().
|
virtual |
Definition at line 723 of file ELdestination.cc.
|
protectedvirtual |
|
protected |
Definition at line 594 of file ELdestination.cc.
References art::left(), n, mf::ELseverityLevel::nLevels, art::right(), s, and statsMap_.
Referenced by mf::service::ELstatistics::summary(), and summary().
|
virtual |
Reimplemented in mf::service::ELstatistics.
Definition at line 565 of file ELdestination.cc.
References mf::ErrorObj::context(), fillPrefix(), fillSuffix(), fillUsrMsg(), outputStatistics_, routePayload(), mf::ErrorObj::setReactedTo(), mf::ELextendedID::severity(), skipMsg(), statsMap_, summarizeContext(), threshold_, updatedStats_, and mf::ErrorObj::xid().
Referenced by flush().
|
delete |
|
delete |
|
protected |
Definition at line 840 of file ELdestination.cc.
References xidLimiters_.
Referenced by mf::service::ELstatistics::summary(), and summary().
|
protected |
Definition at line 834 of file ELdestination.cc.
References statsMap_.
Referenced by mf::service::ELstatistics::summary(), and summary().
|
protectedvirtual |
Reimplemented in mf::service::ELostreamOutput, and mfplugins::ELsyslog.
Definition at line 561 of file ELdestination.cc.
void mf::service::ELdestination::setThreshold | ( | ELseverityLevel | sv | ) |
|
protected |
Definition at line 746 of file ELdestination.cc.
References categoryParams_, defaultLimit_, defaultReportEvery_, defaultTimespan_, mf::ELextendedID::id(), mf::service::ELdestination::XidLimiter::limit_, mf::service::ELdestination::XidLimiter::msgCount_, mf::service::ELdestination::XidLimiter::previousTimestamp_, mf::service::ELdestination::XidLimiter::reportEvery_, mf::service::ELdestination::XidLimiter::skippedMsgCount_, mf::service::ELdestination::XidLimiter::timespan_, and xidLimiters_.
Referenced by mf::service::ELstatistics::log(), and log().
|
protected |
Definition at line 378 of file ELdestination.cc.
Referenced by mf::service::ELstatistics::log(), and log().
|
virtual |
Reimplemented in mf::service::ELstatistics.
Definition at line 706 of file ELdestination.cc.
References mf::ELzeroSeverity, formSummary(), outputStatistics_, reset_, resetLimiters(), resetMsgCounters(), routePayload(), s, and updatedStats_.
|
protected |
Definition at line 264 of file ELdestination.h.
Referenced by ELdestination(), and skipMsg().
|
private |
Definition at line 273 of file ELdestination.h.
Referenced by ELdestination(), emitToken(), and fillPrefix().
|
protected |
Definition at line 261 of file ELdestination.h.
Referenced by ELdestination(), and skipMsg().
|
protected |
Definition at line 262 of file ELdestination.h.
Referenced by ELdestination(), and skipMsg().
|
protected |
Definition at line 263 of file ELdestination.h.
Referenced by ELdestination(), and skipMsg().
|
protected |
Definition at line 260 of file ELdestination.h.
Referenced by ELdestination(), emitToken(), mfplugins::ELsyslog::fillPrefix(), fillPrefix(), fillSuffix(), and fillUsrMsg().
|
protected |
Definition at line 267 of file ELdestination.h.
Referenced by ELdestination(), mf::service::ELstatistics::log(), log(), mf::service::ELstatistics::summary(), and summary().
|
protected |
Definition at line 269 of file ELdestination.h.
Referenced by ELdestination(), mf::service::ELstatistics::summary(), and summary().
|
protected |
Definition at line 266 of file ELdestination.h.
Referenced by ELdestination(), formSummary(), mf::service::ELstatistics::log(), log(), and resetMsgCounters().
|
protected |
Definition at line 259 of file ELdestination.h.
Referenced by mf::service::ELstatistics::log(), log(), and setThreshold().
|
protected |
Definition at line 268 of file ELdestination.h.
Referenced by ELdestination(), mf::service::ELstatistics::log(), log(), mf::service::ELstatistics::summary(), and summary().
|
protected |
Definition at line 265 of file ELdestination.h.
Referenced by ELdestination(), resetLimiters(), and skipMsg().