CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes
edm::service::ThreadSafeLogMessageLoggerScribe Class Reference

#include <ThreadSafeLogMessageLoggerScribe.h>

Inheritance diagram for edm::service::ThreadSafeLogMessageLoggerScribe:
edm::service::AbstractMLscribe

Classes

struct  ConfigurableDefaults
 

Public Member Functions

void runCommand (MessageLoggerQ::OpCode opcode, void *operand) override
 
 ThreadSafeLogMessageLoggerScribe ()
 — If queue is NULL, this sets singleThread true More...
 
 ~ThreadSafeLogMessageLoggerScribe () override
 
- Public Member Functions inherited from edm::service::AbstractMLscribe
 AbstractMLscribe ()
 
virtual ~AbstractMLscribe ()
 

Private Types

using vString = std::vector< std::string >
 

Private Member Functions

void configure_dest (edm::ParameterSet const &job_pset, ConfigurableDefaults const &, vString const &categories, std::shared_ptr< ELdestination > dest_ctrl, edm::ParameterSet const &dest_pset, std::string const &filename)
 
void configure_errorlog (edm::ParameterSet &)
 
void configure_errorlog_new (edm::ParameterSet &)
 
std::vector< std::string > configure_ordinary_destinations (edm::ParameterSet const &, ConfigurableDefaults const &defaults, vString const &categories)
 
void configure_statistics (edm::ParameterSet const &, ConfigurableDefaults const &defaults, vString const &categories, std::vector< std::string > const &destination_names)
 
void configure_statistics_dest (edm::ParameterSet const &job_pset, ConfigurableDefaults const &defaults, vString const &categories, edm::ParameterSet const &stat_pset, std::string const &psetname, std::string const &filename)
 
std::string destinationFileName (edm::ParameterSet const &, std::string const &) const
 
void log (ErrorObj *errorobj_p)
 
std::shared_ptr< ELdestinationmakeDestinationCtrl (std::string const &filename)
 
void parseCategories (std::string const &s, std::vector< std::string > &cats)
 
void triggerFJRmessageSummary (std::map< std::string, double > &sm)
 
void triggerStatisticsSummaries ()
 
void validate (edm::ParameterSet &) const
 

Static Private Member Functions

template<class T >
static T getAparameter (edm::ParameterSet const &p, std::string const &id, T const &def)
 
static ConfigurableDefaults parseDefaults (edm::ParameterSet const &job_pset)
 

Private Attributes

bool m_active
 
edm::propagate_const< std::shared_ptr< ELadministrator > > m_admin_p
 
bool m_clean_slate_configuration
 
std::atomic< int > m_count
 
std::shared_ptr< ELdestinationm_early_dest
 
std::vector< edm::propagate_const< std::shared_ptr< std::ofstream > > > m_file_ps
 
std::atomic< bool > m_messageBeingSent
 
value_ptr< MessageLoggerDefaultsm_messageLoggerDefaults
 
std::atomic< bool > m_purge_mode
 
std::vector< std::shared_ptr< ELstatistics > > m_statisticsDestControls
 
std::vector< bool > m_statisticsResets
 
std::map< std::string, edm::propagate_const< std::ostream * > > m_stream_ps
 
std::atomic< unsigned long > m_tooManyWaitingMessagesCount
 
tbb::concurrent_queue< ErrorObj * > m_waitingMessages
 
size_t m_waitingThreshold
 

Detailed Description

Definition at line 38 of file ThreadSafeLogMessageLoggerScribe.h.

Member Typedef Documentation

◆ vString

using edm::service::ThreadSafeLogMessageLoggerScribe::vString = std::vector<std::string>
private

Definition at line 72 of file ThreadSafeLogMessageLoggerScribe.h.

Constructor & Destructor Documentation

◆ ThreadSafeLogMessageLoggerScribe()

edm::service::ThreadSafeLogMessageLoggerScribe::ThreadSafeLogMessageLoggerScribe ( )
explicit

— If queue is NULL, this sets singleThread true

Definition at line 40 of file ThreadSafeLogMessageLoggerScribe.cc.

41  : m_admin_p(std::make_shared<ELadministrator>()),
42  m_early_dest(m_admin_p->attach(std::make_shared<ELoutput>(std::cerr, false))),
44  m_active(true),
45  m_purge_mode(false),
46  m_count(0),
47  m_messageBeingSent(false),
48  m_waitingThreshold(100),

◆ ~ThreadSafeLogMessageLoggerScribe()

edm::service::ThreadSafeLogMessageLoggerScribe::~ThreadSafeLogMessageLoggerScribe ( )
override

Definition at line 51 of file ThreadSafeLogMessageLoggerScribe.cc.

51  {
52  //if there are any waiting message, finish them off
53  ErrorObj* errorobj_p = nullptr;
54  std::vector<std::string> categories;
55  while (m_waitingMessages.try_pop(errorobj_p)) {
56  if (not m_purge_mode) {
57  categories.clear();
58  parseCategories(errorobj_p->xid().id, categories);
59  for (unsigned int icat = 0; icat < categories.size(); ++icat) {
60  errorobj_p->setID(categories[icat]);
61  m_admin_p->log(*errorobj_p); // route the message text
62  }
63  }
64  delete errorobj_p;
65  }
66 
67  m_admin_p->finish();
68  }

References myMessageLogger_cff::categories, edm::ELextendedID::id, m_admin_p, m_purge_mode, m_waitingMessages, parseCategories(), edm::ErrorObj::setID(), and edm::ErrorObj::xid().

Member Function Documentation

◆ configure_dest()

void edm::service::ThreadSafeLogMessageLoggerScribe::configure_dest ( edm::ParameterSet const &  job_pset,
ConfigurableDefaults const &  defaults,
vString const &  categories,
std::shared_ptr< ELdestination dest_ctrl,
edm::ParameterSet const &  dest_pset,
std::string const &  filename 
)
private

Definition at line 452 of file ThreadSafeLogMessageLoggerScribe.cc.

457  {
458  vString const empty_vString;
459  edm::ParameterSet const empty_PSet;
460  std::string const empty_String;
461 
462  // Defaults: // change log 3a
463  const std::string COMMON_DEFAULT_THRESHOLD = "INFO";
464 
465  vString const severities = {{"WARNING", "INFO", "FWKINFO", "ERROR", "DEBUG"}};
466 
467  // grab default threshold common to all destinations
468  std::string const default_threshold = getAparameter<std::string>(job_pset, "threshold", empty_String);
469  // change log 3a
470  // change log 24
471 
472  // grab default limit/interval/timespan common to all destinations/categories:
473  edm::ParameterSet const default_pset = getAparameter<edm::ParameterSet>(job_pset, "default", empty_PSet);
474 
475  // See if this is just a placeholder // change log 9
476  bool is_placeholder = getAparameter<bool>(dest_pset, "placeholder", false);
477  if (is_placeholder)
478  return;
479 
480  // grab this destination's default limit/interval/timespan:
481  edm::ParameterSet dest_default_pset = getAparameter<edm::ParameterSet>(dest_pset, "default", empty_PSet);
482  int dest_default_limit = getAparameter<int>(dest_default_pset, "limit", defaults.limit_);
483  int dest_default_interval = getAparameter<int>(dest_default_pset, "reportEvery", defaults.reportEvery_);
484  // change log 6
485  int dest_default_timespan = getAparameter<int>(dest_default_pset, "timespan", defaults.timespan_);
486  // change log 1a
487  if (dest_default_limit != defaults.NO_VALUE_SET) {
488  if (dest_default_limit < 0)
489  dest_default_limit = 2000000000;
490  dest_ctrl->setLimit("*", dest_default_limit);
491  } // change log 1b, 2a, 2b
492  if (dest_default_interval != defaults.NO_VALUE_SET) { // change log 6
493  dest_ctrl->setInterval("*", dest_default_interval);
494  }
495  if (dest_default_timespan != defaults.NO_VALUE_SET) {
496  if (dest_default_timespan < 0)
497  dest_default_timespan = 2000000000;
498  dest_ctrl->setTimespan("*", dest_default_timespan);
499  } // change log 1b, 2a, 2b
500 
501  // establish this destination's threshold:
502  std::string dest_threshold = getAparameter<std::string>(dest_pset, "threshold", default_threshold);
503  if (dest_threshold == empty_String) {
504  dest_threshold = default_threshold;
505  }
506  if (dest_threshold == empty_String) { // change log 34
507  dest_threshold = defaults.threshold_;
508  }
509  if (dest_threshold == empty_String) {
510  dest_threshold = m_messageLoggerDefaults->threshold(filename);
511  }
512  if (dest_threshold == empty_String)
513  dest_threshold = COMMON_DEFAULT_THRESHOLD;
514  ELseverityLevel threshold_sev(dest_threshold);
515  dest_ctrl->setThreshold(threshold_sev);
516  // change log 37
517  setGlobalThresholds(threshold_sev);
518 
519  // establish this destination's limit/interval/timespan for each category:
520  for (vString::const_iterator id_it = categories.begin(); id_it != categories.end(); ++id_it) {
521  std::string msgID = *id_it;
522  edm::ParameterSet default_category_pset =
523  getAparameter<edm::ParameterSet>(default_pset, msgID, empty_PSet); // change log 5
524  edm::ParameterSet category_pset = getAparameter<edm::ParameterSet>(dest_pset, msgID, default_category_pset);
525 
526  int category_default_limit = getAparameter<int>(default_category_pset, "limit", defaults.NO_VALUE_SET);
527  int limit = getAparameter<int>(category_pset, "limit", category_default_limit);
528  if (limit == defaults.NO_VALUE_SET)
529  limit = dest_default_limit;
530  // change log 7
531  int category_default_interval = getAparameter<int>(default_category_pset, "reportEvery", defaults.NO_VALUE_SET);
532  int interval = getAparameter<int>(category_pset, "reportEvery", category_default_interval);
533  if (interval == defaults.NO_VALUE_SET)
534  interval = dest_default_interval;
535  // change log 6 and then 7
536  int category_default_timespan = getAparameter<int>(default_category_pset, "timespan", defaults.NO_VALUE_SET);
537  int timespan = getAparameter<int>(category_pset, "timespan", category_default_timespan);
538  if (timespan == defaults.NO_VALUE_SET)
539  timespan = dest_default_timespan;
540  // change log 7
541 
542  const std::string& category = msgID;
543  if (limit == defaults.NO_VALUE_SET) { // change log 24
545  }
546  if (interval == defaults.NO_VALUE_SET) { // change log 24
548  }
549  if (timespan == defaults.NO_VALUE_SET) { // change log 24
550  timespan = m_messageLoggerDefaults->timespan(filename, category);
551  }
552 
553  if (limit != defaults.NO_VALUE_SET) {
554  if (limit < 0)
555  limit = 2000000000;
556  dest_ctrl->setLimit(msgID, limit);
557  } // change log 2a, 2b
558  if (interval != defaults.NO_VALUE_SET) {
559  dest_ctrl->setInterval(msgID, interval);
560  } // change log 6
561  if (timespan != defaults.NO_VALUE_SET) {
562  if (timespan < 0)
563  timespan = 2000000000;
564  dest_ctrl->setTimespan(msgID, timespan);
565  } // change log 2a, 2b
566 
567  } // for
568 
569  // establish this destination's limit for each severity:
570  for (vString::const_iterator sev_it = severities.begin(); sev_it != severities.end(); ++sev_it) {
571  std::string sevID = *sev_it;
572  ELseverityLevel severity(sevID);
573  edm::ParameterSet default_sev_pset = getAparameter<edm::ParameterSet>(default_pset, sevID, empty_PSet);
574  edm::ParameterSet sev_pset = getAparameter<edm::ParameterSet>(dest_pset, sevID, default_sev_pset);
575  // change log 5
576  int limit = getAparameter<int>(sev_pset, "limit", defaults.NO_VALUE_SET);
577  if (limit == defaults.NO_VALUE_SET) { // change log 24
578  limit = m_messageLoggerDefaults->sev_limit(filename, sevID);
579  }
580  if (limit != defaults.NO_VALUE_SET) {
581  if (limit < 0)
582  limit = 2000000000; // change log 38
583  dest_ctrl->setLimit(severity, limit);
584  }
585  int interval = getAparameter<int>(sev_pset, "reportEvery", defaults.NO_VALUE_SET);
586  if (interval == defaults.NO_VALUE_SET) { // change log 24
587  interval = m_messageLoggerDefaults->sev_reportEvery(filename, sevID);
588  }
589  if (interval != defaults.NO_VALUE_SET)
590  dest_ctrl->setInterval(severity, interval);
591  // change log 2
592  int timespan = getAparameter<int>(sev_pset, "timespan", defaults.NO_VALUE_SET);
593  if (timespan == defaults.NO_VALUE_SET) { // change log 24
594  timespan = m_messageLoggerDefaults->sev_timespan(filename, sevID);
595  }
596  if (timespan != defaults.NO_VALUE_SET) {
597  if (timespan < 0)
598  timespan = 2000000000; // change log 38
599  dest_ctrl->setTimespan(severity, timespan);
600  }
601  } // for
602 
603  // establish this destination's linebreak policy:
604  // change log 5
605  bool noLineBreaks = getAparameter<bool>(dest_pset, "noLineBreaks", defaults.noLineBreaks_);
606  if (noLineBreaks) {
607  dest_ctrl->setLineLength(32000);
608  } else {
609  // change log 5
610  int lineLen = getAparameter<int>(dest_pset, "lineLength", defaults.lineLength_);
611  dest_ctrl->setLineLength(lineLen);
612  }
613 
614  // if indicated, suppress time stamps in this destination's output
615  bool suppressTime = getAparameter<bool>(dest_pset, "noTimeStamps", defaults.noTimeStamps_);
616  if (suppressTime) {
617  dest_ctrl->suppressTime();
618  }
619 
620  } // ThreadSafeLogMessageLoggerScribe::configure_dest()

References myMessageLogger_cff::categories, taus_updatedMVAIds_cff::category, hltLogMonitorFilter_cfi::default_threshold, l1GtPatternGenerator_cfi::defaults, corrVsCorr::filename, readEcalDQMStatus::interval, remoteMonitoring_LED_IterMethod_cfg::limit, m_messageLoggerDefaults, hlt_jetmet_dqm_QT_fromfile_cfg::noLineBreaks, ErrorSummaryFilter_cfi::severity, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by configure_errorlog_new(), configure_ordinary_destinations(), and configure_statistics_dest().

◆ configure_errorlog()

void edm::service::ThreadSafeLogMessageLoggerScribe::configure_errorlog ( edm::ParameterSet job_pset)
private

Definition at line 355 of file ThreadSafeLogMessageLoggerScribe.cc.

355  {
356  if (not usingOldConfig(job_pset)) {
357  configure_errorlog_new(job_pset);
358  return;
359  }
360  const vString empty_vString;
361  const std::string empty_String;
362  const edm::ParameterSet empty_PSet;
363 
364  // The following is present to test pre-configuration message handling:
365  std::string preconfiguration_message =
366  getAparameter<std::string>(job_pset, "generate_preconfiguration_message", empty_String);
367  if (preconfiguration_message != empty_String) {
368  // To test a preconfiguration message without first going thru the
369  // configuration we are about to do, we issue the message (so it sits
370  // on the queue), then copy the processing that the LOG_A_MESSAGE case
371  // does. We suppress the timestamp to allow for automated unit testing.
372  m_early_dest->suppressTime();
373  LogError("preconfiguration") << preconfiguration_message;
374  }
375 
376  if (!m_stream_ps.empty()) {
377  LogWarning("multiLogConfig") << "The message logger has been configured multiple times";
378  m_clean_slate_configuration = false; // Change Log 22
379  }
380  m_waitingThreshold = getAparameter<unsigned int>(job_pset, "waiting_threshold", 100);
381  auto defaults = parseDefaults(job_pset);
382  // grab list of categories
383  vString categories = getAparameter<vString>(job_pset, "categories", empty_vString);
384  // grab list of hardwired categories (hardcats) -- these are to be added
385  // to the list of categories -- change log 24
386  {
387  std::vector<std::string> hardcats = m_messageLoggerDefaults->categories;
388  // combine the lists, not caring about possible duplicates (for now)
389  copy_all(hardcats, std::back_inserter(categories));
390  } // no longer need hardcats
391 
392  auto destination_names = configure_ordinary_destinations(job_pset, defaults, categories);
393  configure_statistics(job_pset, defaults, categories, destination_names);
394  } // ThreadSafeLogMessageLoggerScribe::configure_errorlog()

References myMessageLogger_cff::categories, configure_errorlog_new(), configure_ordinary_destinations(), configure_statistics(), edm::copy_all(), l1GtPatternGenerator_cfi::defaults, m_clean_slate_configuration, m_early_dest, m_messageLoggerDefaults, m_stream_ps, m_waitingThreshold, parseDefaults(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by runCommand().

◆ configure_errorlog_new()

void edm::service::ThreadSafeLogMessageLoggerScribe::configure_errorlog_new ( edm::ParameterSet job_pset)
private

Definition at line 279 of file ThreadSafeLogMessageLoggerScribe.cc.

279  {
280  {
281  auto preconfiguration_message =
282  job_pset.getUntrackedParameter<std::string>("generate_preconfiguration_message");
283  if (not preconfiguration_message.empty()) {
284  // To test a preconfiguration message without first going thru the
285  // configuration we are about to do, we issue the message (so it sits
286  // on the queue), then copy the processing that the LOG_A_MESSAGE case
287  // does. We suppress the timestamp to allow for automated unit testing.
288  m_early_dest->suppressTime();
289  LogError("preconfiguration") << preconfiguration_message;
290  }
291  }
292  if (!m_stream_ps.empty()) {
293  LogWarning("multiLogConfig") << "The message logger has been configured multiple times";
294  m_clean_slate_configuration = false; // Change Log 22
295  }
296  m_waitingThreshold = job_pset.getUntrackedParameter<unsigned int>("waiting_threshold");
297 
298  auto defaults = parseDefaults(job_pset);
299  auto categories = findAllCategories(job_pset);
300 
301  // Initialize unversal suppression variables
306 
307  m_early_dest->setThreshold(ELhighestSeverity);
308 
309  auto cout_dest = job_pset.getUntrackedParameter<edm::ParameterSet>("cout");
310  if (cout_dest.getUntrackedParameter<bool>("enable")) {
311  auto dest_ctrl = makeDestinationCtrl("cout");
312  configure_dest(job_pset, defaults, categories, dest_ctrl, cout_dest, "cout");
313  }
314 
315  auto cerr_dest = job_pset.getUntrackedParameter<edm::ParameterSet>("cerr");
316  if (cerr_dest.getUntrackedParameter<bool>("enable")) {
317  auto dest_ctrl = makeDestinationCtrl("cerr");
318  configure_dest(job_pset, defaults, categories, dest_ctrl, cerr_dest, "cerr");
319  }
320 
321  auto const& files = job_pset.getUntrackedParameter<edm::ParameterSet>("files");
322  for (auto const& name : files.getParameterNamesForType<edm::ParameterSet>(false)) {
323  auto const& dest_pset = files.getUntrackedParameter<edm::ParameterSet>(name);
324  auto const actual_filename = destinationFileName(dest_pset, name);
325 
326  // Check that this is not a duplicate name
327  if (m_stream_ps.find(actual_filename) != m_stream_ps.end()) {
329  throw cms::Exception("DuplicateDestination")
330  << "Duplicate name for a MessageLogger Destination: " << actual_filename << "\n"
331  << "Please modify the configuration to use unique file names.";
332  } else {
333  LogWarning("duplicateDestination")
334  << "Duplicate name for a MessageLogger Destination: " << actual_filename << "\n"
335  << "Only original configuration instructions are used";
336  continue;
337  }
338  }
339 
340  auto dest_ctrl = makeDestinationCtrl(actual_filename);
341  configure_dest(job_pset, defaults, categories, dest_ctrl, dest_pset, name);
342  }
343  //NOTE: statistics destinations MUST BE last in the list else they can be fooled into
344  // thinking a message has been ignored just because a later destination which uses it
345  // falls later in the list.
346  for (auto const& name : files.getParameterNamesForType<edm::ParameterSet>(false)) {
347  auto const& dest_pset = files.getUntrackedParameter<edm::ParameterSet>(name);
348  auto const actual_filename = destinationFileName(dest_pset, name);
349  if (getAparameter<bool>(dest_pset, "enableStatistics", false)) {
350  configure_statistics_dest(job_pset, defaults, categories, dest_pset, name, actual_filename);
351  }
352  }
353  }

References myMessageLogger_cff::categories, configure_dest(), configure_statistics_dest(), edm::MessageDrop::debugAlwaysSuppressed, l1GtPatternGenerator_cfi::defaults, destinationFileName(), edm::ELhighestSeverity, Exception, submitPVResolutionJobs::files, edm::MessageDrop::fwkInfoAlwaysSuppressed, edm::ParameterSet::getUntrackedParameter(), edm::MessageDrop::infoAlwaysSuppressed, m_clean_slate_configuration, m_early_dest, m_stream_ps, m_waitingThreshold, makeDestinationCtrl(), Skims_PA_cff::name, parseDefaults(), AlCaHLTBitMon_QueryRunRegistry::string, and edm::MessageDrop::warningAlwaysSuppressed.

Referenced by configure_errorlog().

◆ configure_ordinary_destinations()

std::vector< std::string > edm::service::ThreadSafeLogMessageLoggerScribe::configure_ordinary_destinations ( edm::ParameterSet const &  job_pset,
ConfigurableDefaults const &  defaults,
vString const &  categories 
)
private

Definition at line 622 of file ThreadSafeLogMessageLoggerScribe.cc.

623  {
624  vString const empty_vString;
625  std::string const empty_String;
626  edm::ParameterSet const empty_PSet;
627 
628  // Initialize unversal suppression variables
633 
634  // grab list of destinations:
635  vString destinations = getAparameter<vString>(job_pset, "destinations", empty_vString);
636 
637  // Use the default list of destinations if and only if the grabbed list is
638  // empty // change log 24
639  if (destinations.empty()) {
640  destinations = m_messageLoggerDefaults->destinations;
641  }
642 
643  // dial down the early destination if other dest's are supplied:
644  if (!destinations.empty())
645  m_early_dest->setThreshold(ELhighestSeverity);
646 
647  // establish each destination:
648  std::vector<std::string> ordinary_destination_filenames;
649  for (vString::const_iterator it = destinations.begin(); it != destinations.end(); ++it) {
650  std::string filename = *it;
651  const std::string& psetname = filename;
652 
653  // check that this destination is not just a placeholder // change log 11
654  edm::ParameterSet dest_pset = getAparameter<edm::ParameterSet>(job_pset, psetname, empty_PSet);
655  bool is_placeholder = getAparameter<bool>(dest_pset, "placeholder", false);
656  if (is_placeholder)
657  continue;
658 
659  // Modify the file name if extension or name is explicitly specified
660  // change log 14
661 
662  // Although for an ordinary destination there is no output attribute
663  // for the cfg (you can use filename instead) we provide output() for
664  // uniformity with the statistics destinations. The "right way" to
665  // work this would have been to provide a filename() method, along with
666  // an extension() method. We recognize the potential name confusion here
667  // (filename(filename))!
668 
669  auto const actual_filename = destinationFileName(dest_pset, psetname);
670 
671  // Check that this is not a duplicate name // change log 18
672  if (m_stream_ps.find(actual_filename) != m_stream_ps.end()) {
673  if (m_clean_slate_configuration) { // change log 22
674  // throw edm::Exception ( edm::errors::Configuration )
675  LogError("duplicateDestination") // change log 35
676  << "Duplicate name for a MessageLogger Destination: " << actual_filename << "\n"
677  << "Only the first configuration instructions are used";
678  continue;
679  } else {
680  LogWarning("duplicateDestination")
681  << "Duplicate name for a MessageLogger Destination: " << actual_filename << "\n"
682  << "Only original configuration instructions are used";
683  continue;
684  }
685  }
686 
687  ordinary_destination_filenames.push_back(actual_filename);
688 
689  // attach the current destination, keeping a control handle to it:
690  std::shared_ptr<ELdestination> dest_ctrl = makeDestinationCtrl(actual_filename);
691  // now configure this destination:
692  configure_dest(job_pset, defaults, categories, dest_ctrl, dest_pset, psetname);
693 
694  } // for [it = destinations.begin() to end()]
695 
696  return ordinary_destination_filenames;
697  } // configure_ordinary_destinations

References myMessageLogger_cff::categories, configure_dest(), edm::MessageDrop::debugAlwaysSuppressed, l1GtPatternGenerator_cfi::defaults, destinationFileName(), myMessageLogger_cff::destinations, edm::ELhighestSeverity, corrVsCorr::filename, edm::MessageDrop::fwkInfoAlwaysSuppressed, edm::MessageDrop::infoAlwaysSuppressed, m_clean_slate_configuration, m_early_dest, m_messageLoggerDefaults, m_stream_ps, makeDestinationCtrl(), AlCaHLTBitMon_QueryRunRegistry::string, and edm::MessageDrop::warningAlwaysSuppressed.

Referenced by configure_errorlog().

◆ configure_statistics()

void edm::service::ThreadSafeLogMessageLoggerScribe::configure_statistics ( edm::ParameterSet const &  ,
ConfigurableDefaults const &  defaults,
vString const &  categories,
std::vector< std::string > const &  destination_names 
)
private

Definition at line 733 of file ThreadSafeLogMessageLoggerScribe.cc.

736  {
737  vString const empty_vString;
738  std::string const empty_String;
739  edm::ParameterSet const empty_PSet;
740 
741  // grab list of statistics destinations:
742  vString statistics = getAparameter<vString>(job_pset, "statistics", empty_vString);
743 
744  bool no_statistics_configured = statistics.empty(); // change log 24
745 
746  if (no_statistics_configured) {
747  // Read the list of staistics destinations from hardwired defaults,
748  // but only if there is also no list of ordinary destinations.
749  // (If a cfg specifies destinations, and no statistics, assume that
750  // is what the user wants.)
751  vString destinations = getAparameter<vString>(job_pset, "destinations", empty_vString);
752  if (destinations.empty()) {
753  statistics = m_messageLoggerDefaults->statistics;
754  no_statistics_configured = statistics.empty();
755  } else {
756  for (auto const& dest : destinations) {
757  edm::ParameterSet stat_pset = getAparameter<edm::ParameterSet>(job_pset, dest, empty_PSet);
758  if (getAparameter<bool>(stat_pset, "enableStatistics", false)) {
759  statistics.push_back(dest);
760  }
761  }
762  }
763  }
764 
765  // establish each statistics destination:
766  for (auto const& psetname : statistics) {
767  // check that this destination is not just a placeholder // change log 20
768  edm::ParameterSet stat_pset = getAparameter<edm::ParameterSet>(job_pset, psetname, empty_PSet);
769  bool is_placeholder = getAparameter<bool>(stat_pset, "placeholder", false);
770  if (is_placeholder)
771  continue;
772 
773  // Determine the destination file name
774  std::string filename = getAparameter<std::string>(stat_pset, "output", empty_String);
775  if (filename == empty_String) {
776  filename = m_messageLoggerDefaults->output(psetname); // change log 31
777  if (filename == empty_String) {
778  filename = psetname;
779  }
780  }
781 
782  // Modify the file name if extension or name is explicitly specified
783  // change log 14 -- probably suspenders and a belt, because ouput option
784  // is present, but uniformity is nice.
785 
786  std::string explicit_filename = getAparameter<std::string>(stat_pset, "filename", filename);
787  if (explicit_filename != empty_String)
788  filename = explicit_filename;
789  std::string explicit_extension = getAparameter<std::string>(stat_pset, "extension", empty_String);
790  if (explicit_extension != empty_String) {
791  if (explicit_extension[0] == '.') {
792  filename += explicit_extension;
793  } else {
794  filename = filename + "." + explicit_extension;
795  }
796  }
797 
798  // Attach a default extension of .log if there is no extension on a file
799  // change log 18 - this had been done in concert with attaching destination
800 
801  std::string actual_filename = filename; // change log 4
802  if ((filename != "cout") && (filename != "cerr")) { // change log 23
803  const std::string::size_type npos = std::string::npos;
804  if (filename.find('.') == npos) {
805  actual_filename += ".log";
806  }
807  }
808 
809  // Check that this is not a duplicate name -
810  // unless it is an ordinary destination (which stats can share)
811  if (!search_all(ordinary_destination_filenames, actual_filename)) {
812  if (m_stream_ps.find(actual_filename) != m_stream_ps.end()) {
813  if (m_clean_slate_configuration) { // change log 22
815  << "Duplicate name for a MessageLogger Statistics Destination: " << actual_filename << "\n";
816  } else {
817  LogWarning("duplicateDestination")
818  << "Duplicate name for a MessageLogger Statistics Destination: " << actual_filename << "\n"
819  << "Only original configuration instructions are used";
820  continue;
821  }
822  }
823  }
824 
825  // create (if statistics file does not match any destination file name)
826  // or note (if statistics file matches a destination file name) the ostream.
827  // But if no statistics destinations were provided in the config, do not
828  // create a new destination for this hardwired statistics - only act if
829  // it is matches a destination. (shange log 24)
830  bool statistics_destination_is_real = !no_statistics_configured;
831  std::ostream* os_p;
832  if (m_stream_ps.find(actual_filename) == m_stream_ps.end()) {
833  if (actual_filename == "cout") {
834  os_p = &std::cout;
835  } else if (actual_filename == "cerr") {
836  os_p = &std::cerr;
837  } else {
838  auto os_sp = std::make_shared<std::ofstream>(actual_filename.c_str());
839  m_file_ps.push_back(os_sp);
840  os_p = os_sp.get();
841  }
842  m_stream_ps[actual_filename] = os_p;
843  } else {
844  statistics_destination_is_real = true; // change log 24
845  }
846 
847  if (statistics_destination_is_real) { // change log 24
848  // attach the statistics destination, keeping a control handle to it:
849 
850  configure_statistics_dest(job_pset, defaults, categories, stat_pset, psetname, actual_filename);
851  }
852 
853  } // for [it = statistics.begin() to end()]
854 
855  } // configure_statistics

References myMessageLogger_cff::categories, EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::cerr, edm::errors::Configuration, configure_statistics_dest(), gather_cfg::cout, l1GtPatternGenerator_cfi::defaults, mps_fire::dest, myMessageLogger_cff::destinations, Exception, corrVsCorr::filename, m_clean_slate_configuration, m_file_ps, m_messageLoggerDefaults, m_stream_ps, edm::search_all(), myMessageLogger_cff::statistics, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by configure_errorlog().

◆ configure_statistics_dest()

void edm::service::ThreadSafeLogMessageLoggerScribe::configure_statistics_dest ( edm::ParameterSet const &  job_pset,
ConfigurableDefaults const &  defaults,
vString const &  categories,
edm::ParameterSet const &  stat_pset,
std::string const &  psetname,
std::string const &  filename 
)
private

Definition at line 699 of file ThreadSafeLogMessageLoggerScribe.cc.

704  {
705  auto os_p = m_stream_ps[filename];
706 
707  auto stat = std::make_shared<ELstatistics>(*os_p);
708  m_admin_p->attach(stat);
709  m_statisticsDestControls.push_back(stat);
710  bool reset = getAparameter<bool>(stat_pset, "resetStatistics", false);
711  if (not reset) {
712  //check for old syntax
713  reset = getAparameter<bool>(stat_pset, "reset", false);
714  }
715  m_statisticsResets.push_back(reset);
716 
717  // now configure this destination:
718  configure_dest(job_pset, defaults, categories, stat, stat_pset, psetname);
719 
720  std::string dest_threshold = getAparameter<std::string>(stat_pset, "statisticsThreshold", std::string());
721  if (not dest_threshold.empty()) {
722  ELseverityLevel threshold_sev(dest_threshold);
723  stat->setThreshold(threshold_sev);
724 
725  setGlobalThresholds(threshold_sev);
726  }
727 
728  // and suppress the desire to do an extra termination summary just because
729  // of end-of-job info messages
730  stat->noTerminationSummary();
731  }

References myMessageLogger_cff::categories, configure_dest(), l1GtPatternGenerator_cfi::defaults, corrVsCorr::filename, m_admin_p, m_statisticsDestControls, m_statisticsResets, m_stream_ps, reset(), hgcalPlots::stat, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by configure_errorlog_new(), and configure_statistics().

◆ destinationFileName()

std::string edm::service::ThreadSafeLogMessageLoggerScribe::destinationFileName ( edm::ParameterSet const &  dest_pset,
std::string const &  psetname 
) const
private

Definition at line 244 of file ThreadSafeLogMessageLoggerScribe.cc.

245  {
246  // Determine the destination file name to use if no explicit filename is
247  // supplied in the cfg.
248  std::string const empty_String;
249  std::string filename = psetname;
250  std::string filename_default = getAparameter<std::string>(dest_pset, "output", empty_String);
251  if (filename_default == empty_String) {
252  filename_default = m_messageLoggerDefaults->output(psetname); // change log 31
253  if (filename_default == empty_String) {
254  filename_default = filename;
255  }
256  }
257 
258  std::string explicit_filename = getAparameter<std::string>(dest_pset, "filename", filename_default);
259  if (explicit_filename != empty_String)
260  filename = explicit_filename;
261  std::string explicit_extension = getAparameter<std::string>(dest_pset, "extension", empty_String);
262  if (explicit_extension != empty_String) {
263  if (explicit_extension[0] == '.') {
264  filename += explicit_extension;
265  } else {
266  filename = filename + "." + explicit_extension;
267  }
268  }
269 
270  // Attach a default extension of .log if there is no extension on a file
271  if ((filename != "cout") && (filename != "cerr")) {
272  if (filename.find('.') == std::string::npos) {
273  filename += ".log";
274  }
275  }
276  return filename;
277  }

References corrVsCorr::filename, m_messageLoggerDefaults, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by configure_errorlog_new(), and configure_ordinary_destinations().

◆ getAparameter()

template<class T >
static T edm::service::ThreadSafeLogMessageLoggerScribe::getAparameter ( edm::ParameterSet const &  p,
std::string const &  id,
T const &  def 
)
inlinestaticprivate

Definition at line 105 of file ThreadSafeLogMessageLoggerScribe.h.

105  {
106  T t = def;
107  try {
108  t = p.template getUntrackedParameter<T>(id, def);
109  } catch (...) {
110  try {
111  t = p.template getParameter<T>(id);
112  } catch (...) {
113  // Since PSetValidation will catch such errors, we simply proceed as
114  // best we can in case we are setting up the logger just to contain the
115  // validation-caught error messages.
116  }
117  }
118  return t;
119  }

References spu::def(), AlCaHLTBitMon_ParallelJobs::p, and submitPVValidationJobs::t.

◆ log()

void edm::service::ThreadSafeLogMessageLoggerScribe::log ( ErrorObj errorobj_p)
private

Definition at line 160 of file ThreadSafeLogMessageLoggerScribe.cc.

160  {
161  bool expected = false;
162  std::unique_ptr<ErrorObj> obj(errorobj_p);
163  if (m_messageBeingSent.compare_exchange_strong(expected, true)) {
164  std::vector<std::string> categories;
165  parseCategories(errorobj_p->xid().id, categories);
166  for (unsigned int icat = 0; icat < categories.size(); ++icat) {
167  errorobj_p->setID(categories[icat]);
168  m_admin_p->log(*errorobj_p); // route the message text
169  }
170  //process any waiting messages
171  errorobj_p = nullptr;
172  while (not m_purge_mode and m_waitingMessages.try_pop(errorobj_p)) {
173  obj.reset(errorobj_p);
174  categories.clear();
175  parseCategories(errorobj_p->xid().id, categories);
176  for (unsigned int icat = 0; icat < categories.size(); ++icat) {
177  errorobj_p->setID(categories[icat]);
178  m_admin_p->log(*errorobj_p); // route the message text
179  }
180  }
181  m_messageBeingSent.store(false);
182  } else {
183  if (m_waitingMessages.unsafe_size() < m_waitingThreshold) {
184  obj.release();
185  m_waitingMessages.push(errorobj_p);
186  } else {
188  }
189  }
190  }

References myMessageLogger_cff::categories, edm::ELextendedID::id, m_admin_p, m_messageBeingSent, m_purge_mode, m_tooManyWaitingMessagesCount, m_waitingMessages, m_waitingThreshold, getGTfromDQMFile::obj, parseCategories(), edm::ErrorObj::setID(), and edm::ErrorObj::xid().

Referenced by runCommand().

◆ makeDestinationCtrl()

std::shared_ptr< ELdestination > edm::service::ThreadSafeLogMessageLoggerScribe::makeDestinationCtrl ( std::string const &  filename)
private

Definition at line 396 of file ThreadSafeLogMessageLoggerScribe.cc.

396  {
397  std::shared_ptr<ELdestination> dest_ctrl;
398  if (filename == "cout") {
399  dest_ctrl = m_admin_p->attach(std::make_shared<ELoutput>(std::cout));
400  m_stream_ps["cout"] = &std::cout;
401  } else if (filename == "cerr") {
402  m_early_dest->setThreshold(ELzeroSeverity);
403  dest_ctrl = m_early_dest;
404  m_stream_ps["cerr"] = &std::cerr;
405  } else {
406  auto os_sp = std::make_shared<std::ofstream>(filename.c_str());
407  m_file_ps.push_back(os_sp);
408  dest_ctrl = m_admin_p->attach(std::make_shared<ELoutput>(*os_sp));
409  m_stream_ps[filename] = os_sp.get();
410  }
411  return dest_ctrl;
412  }

References EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::cerr, gather_cfg::cout, edm::ELzeroSeverity, corrVsCorr::filename, m_admin_p, m_early_dest, m_file_ps, and m_stream_ps.

Referenced by configure_errorlog_new(), and configure_ordinary_destinations().

◆ parseCategories()

void edm::service::ThreadSafeLogMessageLoggerScribe::parseCategories ( std::string const &  s,
std::vector< std::string > &  cats 
)
private

Definition at line 857 of file ThreadSafeLogMessageLoggerScribe.cc.

857  {
858  const std::string::size_type npos = std::string::npos;
860  while (i != npos) {
861  std::string::size_type j = s.find('|', i);
862  cats.push_back(s.substr(i, j - i));
863  i = j;
864  while ((i != npos) && (s[i] == '|'))
865  ++i;
866  // the above handles cases of || and also | at end of string
867  }
868  // Note: This algorithm assigns, as desired, one null category if it
869  // encounters an empty categories string
870  }

References mps_fire::i, dqmiolumiharvest::j, and alignCSCRings::s.

Referenced by log(), and ~ThreadSafeLogMessageLoggerScribe().

◆ parseDefaults()

ThreadSafeLogMessageLoggerScribe::ConfigurableDefaults edm::service::ThreadSafeLogMessageLoggerScribe::parseDefaults ( edm::ParameterSet const &  job_pset)
staticprivate

Definition at line 431 of file ThreadSafeLogMessageLoggerScribe.cc.

432  {
433  const edm::ParameterSet empty_PSet;
434  ThreadSafeLogMessageLoggerScribe::ConfigurableDefaults returnValue;
435  // grab default limit/interval/timespan common to all destinations/categories:
436  edm::ParameterSet default_pset = getAparameter<edm::ParameterSet>(job_pset, "default", empty_PSet);
437  returnValue.limit_ = getAparameter<int>(
439  returnValue.reportEvery_ = getAparameter<int>(
441  returnValue.timespan_ = getAparameter<int>(
443  std::string default_threshold = getAparameter<std::string>(job_pset, "threshold", std::string());
444  returnValue.threshold_ = getAparameter<std::string>(default_pset, "threshold", default_threshold);
445  returnValue.noLineBreaks_ = getAparameter<bool>(default_pset, "noLineBreaks", false);
446  returnValue.lineLength_ = getAparameter<int>(default_pset, "lineLength", 80);
447  returnValue.noTimeStamps_ = getAparameter<bool>(default_pset, "noTimeStamps", false);
448 
449  return returnValue;
450  }

References edm::service::ThreadSafeLogMessageLoggerScribe::ConfigurableDefaults::COMMON_DEFAULT_INTERVAL, edm::service::ThreadSafeLogMessageLoggerScribe::ConfigurableDefaults::COMMON_DEFAULT_LIMIT, edm::service::ThreadSafeLogMessageLoggerScribe::ConfigurableDefaults::COMMON_DEFAULT_TIMESPAN, hltLogMonitorFilter_cfi::default_threshold, edm::service::ThreadSafeLogMessageLoggerScribe::ConfigurableDefaults::limit_, edm::service::ThreadSafeLogMessageLoggerScribe::ConfigurableDefaults::lineLength_, edm::service::ThreadSafeLogMessageLoggerScribe::ConfigurableDefaults::noLineBreaks_, edm::service::ThreadSafeLogMessageLoggerScribe::ConfigurableDefaults::noTimeStamps_, edm::service::ThreadSafeLogMessageLoggerScribe::ConfigurableDefaults::reportEvery_, AlCaHLTBitMon_QueryRunRegistry::string, edm::service::ThreadSafeLogMessageLoggerScribe::ConfigurableDefaults::threshold_, and edm::service::ThreadSafeLogMessageLoggerScribe::ConfigurableDefaults::timespan_.

Referenced by configure_errorlog(), and configure_errorlog_new().

◆ runCommand()

void edm::service::ThreadSafeLogMessageLoggerScribe::runCommand ( MessageLoggerQ::OpCode  opcode,
void *  operand 
)
overridevirtual

Reimplemented from edm::service::AbstractMLscribe.

Definition at line 70 of file ThreadSafeLogMessageLoggerScribe.cc.

72  {
73  switch (opcode) { // interpret the work item
74  default: {
75  assert(false); // can't happen (we certainly hope!)
76  break;
77  }
79  break;
80  }
82  ErrorObj* errorobj_p = static_cast<ErrorObj*>(operand);
83  try {
84  if (m_active && !m_purge_mode) {
85  log(errorobj_p);
86  }
87  } catch (cms::Exception& e) {
88  ++m_count;
89  std::cerr << "ThreadSafeLogMessageLoggerScribe caught " << m_count << " cms::Exceptions, text = \n"
90  << e.what() << "\n";
91 
92  if (m_count > 25) {
93  cerr << "MessageLogger will no longer be processing "
94  << "messages due to errors (entering purge mode).\n";
95  m_purge_mode = true;
96  }
97  } catch (...) {
98  std::cerr << "ThreadSafeLogMessageLoggerScribe caught an unknown exception and "
99  << "will no longer be processing "
100  << "messages. (entering purge mode)\n";
101  m_purge_mode = true;
102  }
103  break;
104  }
105  case MessageLoggerQ::CONFIGURE: { // changelog 17
106  auto job_pset_p = std::unique_ptr<edm::ParameterSet>(
107  static_cast<edm::ParameterSet*>(operand)); // propagate_const<T> has no reset() function
108  validate(*job_pset_p);
109  configure_errorlog(*job_pset_p);
110  break;
111  }
113  assert(operand == nullptr);
114  try {
116  } catch (cms::Exception& e) {
117  std::cerr << "ThreadSafeLogMessageLoggerScribe caught exception "
118  << "during summarize:\n"
119  << e.what() << "\n";
120  } catch (...) {
121  std::cerr << "ThreadSafeLogMessageLoggerScribe caught unkonwn exception type "
122  << "during summarize. (Ignored)\n";
123  }
124  break;
125  }
126  case MessageLoggerQ::JOBMODE: { // change log 24
127  std::string* jobMode_p = static_cast<std::string*>(operand);
128  JobMode jm = MessageLoggerDefaults::mode(*jobMode_p);
129  m_messageLoggerDefaults = value_ptr<MessageLoggerDefaults>(new MessageLoggerDefaults(jm));
130  // Note - since m_messageLoggerDefaults is a value_ptr,
131  // there is no concern about deleting here.
132  delete jobMode_p; // dispose of the message text
133  // which will have been new-ed
134  // in MessageLogger.cc (service version)
135  break;
136  }
138  assert(operand == nullptr);
139  m_active = false;
140  break;
141  }
142  case MessageLoggerQ::FLUSH_LOG_Q: { // changelog 26
143  break;
144  }
145  case MessageLoggerQ::GROUP_STATS: { // change log 27
146  std::string* cat_p = static_cast<std::string*>(operand);
148  delete cat_p; // dispose of the message text
149  break;
150  }
151  case MessageLoggerQ::FJR_SUMMARY: { // changelog 29
152  std::map<std::string, double>* smp = static_cast<std::map<std::string, double>*>(operand);
154  break;
155  }
156  } // switch
157 
158  } // ThreadSafeLogMessageLoggerScribe::runCommand(opcode, operand)

References cms::cuda::assert(), EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::cerr, edm::MessageLoggerQ::CONFIGURE, configure_errorlog(), MillePedeFileConverter_cfg::e, edm::MessageLoggerQ::END_THREAD, edm::MessageLoggerQ::FJR_SUMMARY, edm::MessageLoggerQ::FLUSH_LOG_Q, edm::MessageLoggerQ::GROUP_STATS, edm::MessageLoggerQ::JOBMODE, log(), edm::MessageLoggerQ::LOG_A_MESSAGE, m_active, m_count, m_messageLoggerDefaults, m_purge_mode, edm::service::MessageLoggerDefaults::mode(), edm::service::ELstatistics::noteGroupedCategory(), edm::MessageLoggerQ::SHUT_UP, AlCaHLTBitMon_QueryRunRegistry::string, edm::MessageLoggerQ::SUMMARIZE, triggerFJRmessageSummary(), triggerStatisticsSummaries(), and validate().

◆ triggerFJRmessageSummary()

void edm::service::ThreadSafeLogMessageLoggerScribe::triggerFJRmessageSummary ( std::map< std::string, double > &  sm)
private

Definition at line 881 of file ThreadSafeLogMessageLoggerScribe.cc.

882  {
883  if (m_statisticsDestControls.empty()) {
884  sm["NoStatisticsDestinationsConfigured"] = 0.0;
885  } else {
886  m_statisticsDestControls[0]->summaryForJobReport(sm);
887  }
888  }

References m_statisticsDestControls.

Referenced by runCommand().

◆ triggerStatisticsSummaries()

void edm::service::ThreadSafeLogMessageLoggerScribe::triggerStatisticsSummaries ( )
private

Definition at line 872 of file ThreadSafeLogMessageLoggerScribe.cc.

872  {
874  for (unsigned int i = 0; i != m_statisticsDestControls.size(); ++i) {
876  if (m_statisticsResets[i])
877  m_statisticsDestControls[i]->wipe();
878  }
879  }

References cms::cuda::assert(), mps_fire::i, m_statisticsDestControls, m_statisticsResets, and m_tooManyWaitingMessagesCount.

Referenced by runCommand().

◆ validate()

void edm::service::ThreadSafeLogMessageLoggerScribe::validate ( edm::ParameterSet pset) const
private

Definition at line 971 of file ThreadSafeLogMessageLoggerScribe.cc.

971  {
972  // See if old config API is being used
973  if (usingOldConfig(pset))
974  return;
975  if (not pset.exists("files") and
976  ((pset.exists("destinations") or pset.existsAs<std::vector<std::string>>("statistics", true) or
977  pset.existsAs<std::vector<std::string>>("statistics", false) or pset.exists("categories")))) {
978  return;
979  }
980 
981  ConfigurationDescriptions config{"MessageLogger", "MessageLogger"};
983 
984  config.validate(pset, "MessageLogger");
985  }

References fillDescriptions(), or, and muonDTDigis_cfi::pset.

Referenced by runCommand().

Member Data Documentation

◆ m_active

bool edm::service::ThreadSafeLogMessageLoggerScribe::m_active
private

Definition at line 136 of file ThreadSafeLogMessageLoggerScribe.h.

Referenced by runCommand().

◆ m_admin_p

edm::propagate_const<std::shared_ptr<ELadministrator> > edm::service::ThreadSafeLogMessageLoggerScribe::m_admin_p
private

◆ m_clean_slate_configuration

bool edm::service::ThreadSafeLogMessageLoggerScribe::m_clean_slate_configuration
private

◆ m_count

std::atomic<int> edm::service::ThreadSafeLogMessageLoggerScribe::m_count
private

Definition at line 138 of file ThreadSafeLogMessageLoggerScribe.h.

Referenced by runCommand().

◆ m_early_dest

std::shared_ptr<ELdestination> edm::service::ThreadSafeLogMessageLoggerScribe::m_early_dest
private

◆ m_file_ps

std::vector<edm::propagate_const<std::shared_ptr<std::ofstream> > > edm::service::ThreadSafeLogMessageLoggerScribe::m_file_ps
private

◆ m_messageBeingSent

std::atomic<bool> edm::service::ThreadSafeLogMessageLoggerScribe::m_messageBeingSent
private

Definition at line 139 of file ThreadSafeLogMessageLoggerScribe.h.

Referenced by log().

◆ m_messageLoggerDefaults

value_ptr<MessageLoggerDefaults> edm::service::ThreadSafeLogMessageLoggerScribe::m_messageLoggerDefaults
private

◆ m_purge_mode

std::atomic<bool> edm::service::ThreadSafeLogMessageLoggerScribe::m_purge_mode
private

◆ m_statisticsDestControls

std::vector<std::shared_ptr<ELstatistics> > edm::service::ThreadSafeLogMessageLoggerScribe::m_statisticsDestControls
private

◆ m_statisticsResets

std::vector<bool> edm::service::ThreadSafeLogMessageLoggerScribe::m_statisticsResets
private

◆ m_stream_ps

std::map<std::string, edm::propagate_const<std::ostream*> > edm::service::ThreadSafeLogMessageLoggerScribe::m_stream_ps
private

◆ m_tooManyWaitingMessagesCount

std::atomic<unsigned long> edm::service::ThreadSafeLogMessageLoggerScribe::m_tooManyWaitingMessagesCount
private

Definition at line 142 of file ThreadSafeLogMessageLoggerScribe.h.

Referenced by log(), and triggerStatisticsSummaries().

◆ m_waitingMessages

tbb::concurrent_queue<ErrorObj*> edm::service::ThreadSafeLogMessageLoggerScribe::m_waitingMessages
private

Definition at line 140 of file ThreadSafeLogMessageLoggerScribe.h.

Referenced by log(), and ~ThreadSafeLogMessageLoggerScribe().

◆ m_waitingThreshold

size_t edm::service::ThreadSafeLogMessageLoggerScribe::m_waitingThreshold
private
taus_updatedMVAIds_cff.category
category
Definition: taus_updatedMVAIds_cff.py:31
edm::MessageLoggerQ::SHUT_UP
Definition: MessageLoggerQ.h:42
edm::copy_all
Func copy_all(ForwardSequence &s, Func f)
wrappers for copy
Definition: Algorithms.h:20
mps_fire.i
i
Definition: mps_fire.py:428
edm::service::ThreadSafeLogMessageLoggerScribe::m_messageLoggerDefaults
value_ptr< MessageLoggerDefaults > m_messageLoggerDefaults
Definition: ThreadSafeLogMessageLoggerScribe.h:135
edm::MessageDrop::warningAlwaysSuppressed
static bool warningAlwaysSuppressed
Definition: MessageDrop.h:74
myMessageLogger_cff.categories
categories
Definition: myMessageLogger_cff.py:10
edm::ELhighestSeverity
constexpr const ELseverityLevel ELhighestSeverity
Definition: ELseverityLevel.h:108
hltLogMonitorFilter_cfi.default_threshold
default_threshold
Definition: hltLogMonitorFilter_cfi.py:4
edm::MessageLoggerQ::FLUSH_LOG_Q
Definition: MessageLoggerQ.h:44
edm::service::ThreadSafeLogMessageLoggerScribe::triggerStatisticsSummaries
void triggerStatisticsSummaries()
Definition: ThreadSafeLogMessageLoggerScribe.cc:872
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
gather_cfg.cout
cout
Definition: gather_cfg.py:144
edm::service::ThreadSafeLogMessageLoggerScribe::m_admin_p
edm::propagate_const< std::shared_ptr< ELadministrator > > m_admin_p
Definition: ThreadSafeLogMessageLoggerScribe.h:128
edm::service::MessageLoggerDefaults::mode
static edm::JobMode mode(std::string const &jm)
Definition: HardwiredDefaults.cc:30
edm::service::ThreadSafeLogMessageLoggerScribe::log
void log(ErrorObj *errorobj_p)
Definition: ThreadSafeLogMessageLoggerScribe.cc:160
edm::service::ThreadSafeLogMessageLoggerScribe::parseDefaults
static ConfigurableDefaults parseDefaults(edm::ParameterSet const &job_pset)
Definition: ThreadSafeLogMessageLoggerScribe.cc:431
cms::cuda::assert
assert(be >=bs)
edm::service::ThreadSafeLogMessageLoggerScribe::m_messageBeingSent
std::atomic< bool > m_messageBeingSent
Definition: ThreadSafeLogMessageLoggerScribe.h:139
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
edm::service::ThreadSafeLogMessageLoggerScribe::configure_statistics
void configure_statistics(edm::ParameterSet const &, ConfigurableDefaults const &defaults, vString const &categories, std::vector< std::string > const &destination_names)
Definition: ThreadSafeLogMessageLoggerScribe.cc:733
edm::MessageLoggerQ::CONFIGURE
Definition: MessageLoggerQ.h:34
edm::service::ThreadSafeLogMessageLoggerScribe::m_clean_slate_configuration
bool m_clean_slate_configuration
Definition: ThreadSafeLogMessageLoggerScribe.h:134
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
myMessageLogger_cff.destinations
destinations
Definition: myMessageLogger_cff.py:36
edm::MessageDrop::infoAlwaysSuppressed
static bool infoAlwaysSuppressed
Definition: MessageDrop.h:72
edm::service::ThreadSafeLogMessageLoggerScribe::parseCategories
void parseCategories(std::string const &s, std::vector< std::string > &cats)
Definition: ThreadSafeLogMessageLoggerScribe.cc:857
config
Definition: config.py:1
alignCSCRings.s
s
Definition: alignCSCRings.py:92
edm::MessageLoggerQ::END_THREAD
Definition: MessageLoggerQ.h:30
edm::service::ThreadSafeLogMessageLoggerScribe::configure_dest
void configure_dest(edm::ParameterSet const &job_pset, ConfigurableDefaults const &, vString const &categories, std::shared_ptr< ELdestination > dest_ctrl, edm::ParameterSet const &dest_pset, std::string const &filename)
Definition: ThreadSafeLogMessageLoggerScribe.cc:452
edm::service::ELstatistics::noteGroupedCategory
static void noteGroupedCategory(std::string const &cat)
Definition: ELstatistics.cc:482
trigger::size_type
uint16_t size_type
Definition: TriggerTypeDefs.h:18
submitPVResolutionJobs.files
files
Definition: submitPVResolutionJobs.py:373
hgcalPlots.stat
stat
Definition: hgcalPlots.py:1119
edm::service::ThreadSafeLogMessageLoggerScribe::triggerFJRmessageSummary
void triggerFJRmessageSummary(std::map< std::string, double > &sm)
Definition: ThreadSafeLogMessageLoggerScribe.cc:881
fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::service::ThreadSafeLogMessageLoggerScribe::makeDestinationCtrl
std::shared_ptr< ELdestination > makeDestinationCtrl(std::string const &filename)
Definition: ThreadSafeLogMessageLoggerScribe.cc:396
edm::service::ThreadSafeLogMessageLoggerScribe::m_waitingThreshold
size_t m_waitingThreshold
Definition: ThreadSafeLogMessageLoggerScribe.h:141
corrVsCorr.filename
filename
Definition: corrVsCorr.py:123
edm::service::ThreadSafeLogMessageLoggerScribe::configure_errorlog_new
void configure_errorlog_new(edm::ParameterSet &)
Definition: ThreadSafeLogMessageLoggerScribe.cc:279
edm::MessageLoggerQ::GROUP_STATS
Definition: MessageLoggerQ.h:46
edm::service::ThreadSafeLogMessageLoggerScribe::configure_statistics_dest
void configure_statistics_dest(edm::ParameterSet const &job_pset, ConfigurableDefaults const &defaults, vString const &categories, edm::ParameterSet const &stat_pset, std::string const &psetname, std::string const &filename)
Definition: ThreadSafeLogMessageLoggerScribe.cc:699
edm::MessageDrop::debugAlwaysSuppressed
static bool debugAlwaysSuppressed
Definition: MessageDrop.h:71
edm::service::ThreadSafeLogMessageLoggerScribe::ConfigurableDefaults::COMMON_DEFAULT_TIMESPAN
static constexpr int COMMON_DEFAULT_TIMESPAN
Definition: ThreadSafeLogMessageLoggerScribe.h:57
getGTfromDQMFile.obj
obj
Definition: getGTfromDQMFile.py:32
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
l1GtPatternGenerator_cfi.defaults
defaults
Definition: l1GtPatternGenerator_cfi.py:93
edm::service::ThreadSafeLogMessageLoggerScribe::m_stream_ps
std::map< std::string, edm::propagate_const< std::ostream * > > m_stream_ps
Definition: ThreadSafeLogMessageLoggerScribe.h:131
edm::ParameterSet
Definition: ParameterSet.h:47
edm::service::ThreadSafeLogMessageLoggerScribe::m_waitingMessages
tbb::concurrent_queue< ErrorObj * > m_waitingMessages
Definition: ThreadSafeLogMessageLoggerScribe.h:140
edm::service::ThreadSafeLogMessageLoggerScribe::m_count
std::atomic< int > m_count
Definition: ThreadSafeLogMessageLoggerScribe.h:138
readEcalDQMStatus.interval
interval
Definition: readEcalDQMStatus.py:18
edm::service::ThreadSafeLogMessageLoggerScribe::m_early_dest
std::shared_ptr< ELdestination > m_early_dest
Definition: ThreadSafeLogMessageLoggerScribe.h:129
hlt_jetmet_dqm_QT_fromfile_cfg.noLineBreaks
noLineBreaks
Definition: hlt_jetmet_dqm_QT_fromfile_cfg.py:118
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
edm::MessageLoggerQ::FJR_SUMMARY
Definition: MessageLoggerQ.h:48
MessageLoggerDefaults
edm::service::ThreadSafeLogMessageLoggerScribe::m_statisticsDestControls
std::vector< std::shared_ptr< ELstatistics > > m_statisticsDestControls
Definition: ThreadSafeLogMessageLoggerScribe.h:132
edm::service::ThreadSafeLogMessageLoggerScribe::m_tooManyWaitingMessagesCount
std::atomic< unsigned long > m_tooManyWaitingMessagesCount
Definition: ThreadSafeLogMessageLoggerScribe.h:142
edm::service::ThreadSafeLogMessageLoggerScribe::ConfigurableDefaults::COMMON_DEFAULT_LIMIT
static constexpr int COMMON_DEFAULT_LIMIT
Definition: ThreadSafeLogMessageLoggerScribe.h:55
ConfigurationDescriptions
remoteMonitoring_LED_IterMethod_cfg.limit
limit
Definition: remoteMonitoring_LED_IterMethod_cfg.py:427
edm::MessageLoggerQ::LOG_A_MESSAGE
Definition: MessageLoggerQ.h:32
edm::JobMode
JobMode
Definition: JobMode.h:15
T
long double T
Definition: Basic3DVectorLD.h:48
ErrorSummaryFilter_cfi.severity
severity
Definition: ErrorSummaryFilter_cfi.py:5
edm::service::ThreadSafeLogMessageLoggerScribe::configure_errorlog
void configure_errorlog(edm::ParameterSet &)
Definition: ThreadSafeLogMessageLoggerScribe.cc:355
edm::MessageLoggerQ::JOBMODE
Definition: MessageLoggerQ.h:40
Exception
Definition: hltDiff.cc:246
edm::service::ThreadSafeLogMessageLoggerScribe::destinationFileName
std::string destinationFileName(edm::ParameterSet const &, std::string const &) const
Definition: ThreadSafeLogMessageLoggerScribe.cc:244
edm::service::ThreadSafeLogMessageLoggerScribe::vString
std::vector< std::string > vString
Definition: ThreadSafeLogMessageLoggerScribe.h:72
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
or
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
edm::service::ThreadSafeLogMessageLoggerScribe::validate
void validate(edm::ParameterSet &) const
Definition: ThreadSafeLogMessageLoggerScribe.cc:971
edm::MessageLoggerQ::SUMMARIZE
Definition: MessageLoggerQ.h:38
edm::service::ThreadSafeLogMessageLoggerScribe::ConfigurableDefaults::COMMON_DEFAULT_INTERVAL
static constexpr int COMMON_DEFAULT_INTERVAL
Definition: ThreadSafeLogMessageLoggerScribe.h:56
edm::service::ThreadSafeLogMessageLoggerScribe::configure_ordinary_destinations
std::vector< std::string > configure_ordinary_destinations(edm::ParameterSet const &, ConfigurableDefaults const &defaults, vString const &categories)
Definition: ThreadSafeLogMessageLoggerScribe.cc:622
reset
void reset(double vett[256])
Definition: TPedValues.cc:11
spu::def
int def(FILE *, FILE *, int)
Definition: SherpackUtilities.cc:14
edm::search_all
bool search_all(ForwardSequence const &s, Datum const &d)
Definition: Algorithms.h:36
myMessageLogger_cff.statistics
statistics
Definition: myMessageLogger_cff.py:9
cms::Exception
Definition: Exception.h:70
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
edm::service::ThreadSafeLogMessageLoggerScribe::m_file_ps
std::vector< edm::propagate_const< std::shared_ptr< std::ofstream > > > m_file_ps
Definition: ThreadSafeLogMessageLoggerScribe.h:130
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.cerr
cerr
Definition: EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.py:8
edm::service::ThreadSafeLogMessageLoggerScribe::m_active
bool m_active
Definition: ThreadSafeLogMessageLoggerScribe.h:136
edm::errors::Configuration
Definition: EDMException.h:36
edm::MessageDrop::fwkInfoAlwaysSuppressed
static bool fwkInfoAlwaysSuppressed
Definition: MessageDrop.h:73
edm::service::ThreadSafeLogMessageLoggerScribe::m_purge_mode
std::atomic< bool > m_purge_mode
Definition: ThreadSafeLogMessageLoggerScribe.h:137
edm::service::ThreadSafeLogMessageLoggerScribe::m_statisticsResets
std::vector< bool > m_statisticsResets
Definition: ThreadSafeLogMessageLoggerScribe.h:133
edm::ELzeroSeverity
constexpr const ELseverityLevel ELzeroSeverity
Definition: ELseverityLevel.h:92
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
mps_fire.dest
dest
Definition: mps_fire.py:179
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37