CMS 3D CMS Logo

ThreadSafeLogMessageLoggerScribe.cc
Go to the documentation of this file.
1 // ----------------------------------------------------------------------
2 //
3 // ThreadSafeLogMessageLoggerScribe.cc
4 //
5 // NOTE: This was originally copied from MessageLoggerScribe but removed
6 // the potential use of the ThreadQueue. MessageLoggerScribe was not
7 // modified since it was decided we might have to keep the old behaviour
8 // around for 'legacy' reasons.
9 //
10 // ----------------------------------------------------------------------
11 
16 
20 #include "FWCore/MessageLogger/interface/MessageDrop.h" // change log 37
21 #include "FWCore/MessageLogger/interface/ELseverityLevel.h" // change log 37
22 
25 
28 
29 #include <algorithm>
30 #include <cassert>
31 #include <fstream>
32 #include <string>
33 #include <csignal>
34 
35 using std::cerr;
36 
37 namespace edm {
38  namespace service {
39 
41  : m_admin_p(std::make_shared<ELadministrator>()),
42  m_early_dest(m_admin_p->attach(std::make_shared<ELoutput>(std::cerr, false))),
43  m_clean_slate_configuration(true),
44  m_active(true),
45  m_purge_mode(false),
46  m_count(0),
47  m_messageBeingSent(false),
48  m_waitingThreshold(100),
49  m_tooManyWaitingMessagesCount(0) {}
50 
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  }
69 
72  void* operand) {
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);
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)
159 
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  }
191 
192  namespace {
193  bool usingOldConfig(edm::ParameterSet const& pset) {
194  if (not pset.exists("files") and
195  ((pset.exists("destinations") or pset.existsAs<std::vector<std::string>>("statistics", true) or
196  pset.existsAs<std::vector<std::string>>("statistics", false) or pset.exists("categories")))) {
197  return true;
198  }
199  return false;
200  }
201 
202  std::set<std::string> findCategoriesInDestination(edm::ParameterSet const& pset) {
203  auto psets = pset.getParameterNamesForType<edm::ParameterSet>(false);
204  auto itFound = std::find(psets.begin(), psets.end(), "default");
205  if (itFound != psets.end()) {
206  psets.erase(itFound);
207  }
208 
209  return std::set<std::string>(psets.begin(), psets.end());
210  }
211  std::vector<std::string> findAllCategories(edm::ParameterSet const& pset) {
212  std::set<std::string> categories;
213 
214  auto psets = pset.getParameterNamesForType<edm::ParameterSet>(false);
215  auto itFound = std::find(psets.begin(), psets.end(), "default");
216  if (itFound != psets.end()) {
217  categories = findCategoriesInDestination(pset.getUntrackedParameter<edm::ParameterSet>("default"));
218  psets.erase(itFound);
219  }
220 
221  itFound = std::find(psets.begin(), psets.end(), "cout");
222  if (itFound != psets.end()) {
223  categories.merge(findCategoriesInDestination(pset.getUntrackedParameter<edm::ParameterSet>("cout")));
224  psets.erase(itFound);
225  }
226 
227  itFound = std::find(psets.begin(), psets.end(), "cerr");
228  if (itFound != psets.end()) {
229  categories.merge(findCategoriesInDestination(pset.getUntrackedParameter<edm::ParameterSet>("cerr")));
230  psets.erase(itFound);
231  }
232 
233  auto const& files = pset.getUntrackedParameter<edm::ParameterSet>("files");
234  for (auto const& name : files.getParameterNamesForType<edm::ParameterSet>(false)) {
235  categories.merge(findCategoriesInDestination(files.getUntrackedParameter<edm::ParameterSet>(name)));
236  }
237  categories.insert(psets.begin(), psets.end());
238 
239  return std::vector<std::string>(categories.begin(), categories.end());
240  }
241 
242  } // namespace
243 
245  std::string const& psetname) const {
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  }
278 
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  }
354 
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()
395 
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  }
413 
414  namespace {
415  void setGlobalThresholds(ELseverityLevel threshold_sev) {
416  if (threshold_sev <= ELseverityLevel::ELsev_success) {
418  }
419  if (threshold_sev <= ELseverityLevel::ELsev_info) {
421  }
422  if (threshold_sev <= ELseverityLevel::ELsev_fwkInfo) {
424  }
425  if (threshold_sev <= ELseverityLevel::ELsev_warning) {
427  }
428  }
429  } // namespace
430 
432  edm::ParameterSet const& job_pset) {
433  const edm::ParameterSet empty_PSet;
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  }
451 
454  vString const& categories,
455  std::shared_ptr<ELdestination> dest_ctrl,
456  edm::ParameterSet const& dest_pset,
457  std::string const& filename) {
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()
621 
623  edm::ParameterSet const& job_pset, ConfigurableDefaults const& defaults, vString const& categories) {
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
698 
701  vString const& categories,
702  edm::ParameterSet const& stat_pset,
703  std::string const& psetname,
704  std::string const& filename) {
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  }
732 
735  vString const& categories,
736  vString const& ordinary_destination_filenames) {
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
856 
857  void ThreadSafeLogMessageLoggerScribe::parseCategories(std::string const& s, std::vector<std::string>& cats) {
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  }
871 
874  for (unsigned int i = 0; i != m_statisticsDestControls.size(); ++i) {
876  if (m_statisticsResets[i])
877  m_statisticsDestControls[i]->wipe();
878  }
879  }
880 
881  void ThreadSafeLogMessageLoggerScribe::triggerFJRmessageSummary(std::map<std::string, double>& sm) // ChangeLog 29
882  {
883  if (m_statisticsDestControls.empty()) {
884  sm["NoStatisticsDestinationsConfigured"] = 0.0;
885  } else {
886  m_statisticsDestControls[0]->summaryForJobReport(sm);
887  }
888  }
889 
890  namespace {
893 
894  topDesc.addUntracked<bool>("messageSummaryToJobReport", false);
895  topDesc.addUntracked<std::string>("generate_preconfiguration_message", "");
896  topDesc.addUntracked<unsigned int>("waiting_threshold", 100);
897  topDesc.addUntracked<std::vector<std::string>>("suppressDebug", {});
898  topDesc.addUntracked<std::vector<std::string>>("suppressInfo", {});
899  topDesc.addUntracked<std::vector<std::string>>("suppressFwkInfo", {});
900  topDesc.addUntracked<std::vector<std::string>>("suppressWarning", {});
901  topDesc.addUntracked<std::vector<std::string>>("suppressError", {});
902  topDesc.addUntracked<std::vector<std::string>>("debugModules", {});
903 
905  category.addUntracked<int>("reportEvery", 1);
907  ->setComment(
908  "Set a limit on the number of messages of this category. The default value is used to denote no "
909  "limit.");
910  category.addOptionalUntracked<int>("timespan");
911 
912  edm::ParameterSetDescription destination_base;
913  destination_base.addOptionalUntracked<bool>("noLineBreaks");
914  destination_base.addOptionalUntracked<bool>("noTimeStamps");
915  destination_base.addOptionalUntracked<int>("lineLength");
916  destination_base.addOptionalUntracked<std::string>("threshold");
917  destination_base.addOptionalUntracked<std::string>("statisticsThreshold");
918 
920  catnode.setComment("Specialize either a category or any of 'DEBUG', 'INFO', 'FWKINFO', 'WARNING' or 'ERROR'");
921  destination_base.addNode(catnode);
922 
923  edm::ParameterSetDescription destination_noStats(destination_base);
924  destination_noStats.addUntracked<bool>("enableStatistics", false);
925  destination_noStats.addUntracked<bool>("resetStatistics", false);
926 
927  {
928  edm::ParameterSetDescription default_pset;
929  default_pset.addUntracked<int>("reportEvery", 1);
931  ->setComment(
932  "Set a limit on the number of messages of this category. The default value is used to denote no "
933  "limit.");
934  default_pset.addOptionalUntracked<int>("timespan");
935  default_pset.addUntracked<bool>("noLineBreaks", false);
936  default_pset.addUntracked<bool>("noTimeStamps", false);
937  default_pset.addUntracked<int>("lineLength", 80);
938  default_pset.addUntracked<std::string>("threshold", "INFO");
939  default_pset.addUntracked<std::string>("statisticsThreshold", "INFO");
940  default_pset.addNode(catnode);
941 
942  edm::ParameterSetDescription cerr_destination(destination_base);
943  cerr_destination.addUntracked<bool>("enableStatistics", true);
944  cerr_destination.addUntracked<bool>("resetStatistics", false);
945  cerr_destination.addUntracked<bool>("enable", true);
946 
947  edm::ParameterSetDescription cout_destination(destination_noStats);
948  cout_destination.addUntracked<bool>("enable", false);
949 
950  edm::ParameterSetDescription fileDestination(destination_noStats);
951 
952  fileDestination.addOptionalUntracked<std::string>("output");
953  fileDestination.addOptionalUntracked<std::string>("filename");
954  fileDestination.addOptionalUntracked<std::string>("extension");
957  "*", edm::RequireZeroOrMore, false, fileDestination);
958  files.addNode(fileWildcard);
959 
960  std::map<std::string, edm::ParameterSetDescription> standards = {
961  {"cerr", cerr_destination}, {"cout", cout_destination}, {"default", default_pset}, {"files", files}};
962 
964  topDesc.addNode(psets);
965  }
966 
967  config.addDefault(topDesc);
968  }
969  } // namespace
970 
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  }
986 
987  } // end of namespace service
988 } // end of namespace edm
ConfigurationDescriptions.h
edm::service::ThreadSafeLogMessageLoggerScribe::ConfigurableDefaults::reportEvery_
int reportEvery_
Definition: ThreadSafeLogMessageLoggerScribe.h:61
ELstatistics.h
taus_updatedMVAIds_cff.category
category
Definition: taus_updatedMVAIds_cff.py:31
service
Definition: service.py:1
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::ELoutput
Definition: ELoutput.h:43
MessageLogger.h
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
funct::false
false
Definition: Factorize.h:29
edm::service::ThreadSafeLogMessageLoggerScribe::ConfigurableDefaults::lineLength_
int lineLength_
Definition: ThreadSafeLogMessageLoggerScribe.h:63
edm::ELhighestSeverity
constexpr const ELseverityLevel ELhighestSeverity
Definition: ELseverityLevel.h:108
edm::ParameterWildcard
Definition: ParameterWildcard.h:23
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
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::ErrorObj
Definition: ErrorObj.h:43
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::ThreadSafeLogMessageLoggerScribe::ConfigurableDefaults::NO_VALUE_SET
static constexpr int NO_VALUE_SET
Definition: ThreadSafeLogMessageLoggerScribe.h:54
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::ParameterSetDescription
Definition: ParameterSetDescription.h:52
edm::service::ThreadSafeLogMessageLoggerScribe::parseDefaults
static ConfigurableDefaults parseDefaults(edm::ParameterSet const &job_pset)
Definition: ThreadSafeLogMessageLoggerScribe.cc:431
Algorithms.h
ErrorObj.h
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::ELseverityLevel::ELsev_fwkInfo
Definition: ELseverityLevel.h:40
edm::service::ThreadSafeLogMessageLoggerScribe::ConfigurableDefaults
Definition: ThreadSafeLogMessageLoggerScribe.h:53
edm::service::ThreadSafeLogMessageLoggerScribe::m_clean_slate_configuration
bool m_clean_slate_configuration
Definition: ThreadSafeLogMessageLoggerScribe.h:134
edm::service::ThreadSafeLogMessageLoggerScribe::ConfigurableDefaults::timespan_
int timespan_
Definition: ThreadSafeLogMessageLoggerScribe.h:62
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
edm::ParameterSetDescription::addOptionalUntracked
ParameterDescriptionBase * addOptionalUntracked(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:110
myMessageLogger_cff.destinations
destinations
Definition: myMessageLogger_cff.py:36
edm::MessageDrop::infoAlwaysSuppressed
static bool infoAlwaysSuppressed
Definition: MessageDrop.h:72
EDMException.h
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::MessageLoggerDefaults
Definition: MessageLoggerDefaults.h:69
edm::service::ELstatistics::noteGroupedCategory
static void noteGroupedCategory(std::string const &cat)
Definition: ELstatistics.cc:482
edm::service::ThreadSafeLogMessageLoggerScribe::ConfigurableDefaults::limit_
int limit_
Definition: ThreadSafeLogMessageLoggerScribe.h:60
trigger::size_type
uint16_t size_type
Definition: TriggerTypeDefs.h:18
edm::ParameterWildcardWithSpecifics
Definition: ParameterWildcardWithSpecifics.h:15
submitPVResolutionJobs.files
files
Definition: submitPVResolutionJobs.py:373
hgcalPlots.stat
stat
Definition: hgcalPlots.py:1119
edm::service::ELadministrator
Definition: ELadministrator.h:66
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::ErrorObj::setID
virtual void setID(std::string_view ID)
Definition: ErrorObj.cc:167
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
ELoutput.h
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
edm::ErrorObj::xid
const ELextendedID & xid() const
Definition: ErrorObj.cc:142
getGTfromDQMFile.obj
obj
Definition: getGTfromDQMFile.py:32
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
funct::true
true
Definition: Factorize.h:173
edm::ParameterSetDescription::addUntracked
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:100
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
MessageDrop.h
edm::ParameterSet
Definition: ParameterSet.h:47
edm::ELseverityLevel::ELsev_warning
Definition: ELseverityLevel.h:42
edm::value_ptr
Definition: value_ptr.h:63
ParameterWildcardWithSpecifics.h
ELadministrator.h
edm::service::ThreadSafeLogMessageLoggerScribe::ThreadSafeLogMessageLoggerScribe
ThreadSafeLogMessageLoggerScribe()
— If queue is NULL, this sets singleThread true
Definition: ThreadSafeLogMessageLoggerScribe.cc:40
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::ELseverityLevel::ELsev_success
Definition: ELseverityLevel.h:36
edm::ParameterSetDescription::addNode
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
Definition: ParameterSetDescription.cc:41
edm::service::ThreadSafeLogMessageLoggerScribe::ConfigurableDefaults::threshold_
std::string threshold_
Definition: ThreadSafeLogMessageLoggerScribe.h:59
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
edm::MessageLoggerQ::FJR_SUMMARY
Definition: MessageLoggerQ.h:48
edm::service::ThreadSafeLogMessageLoggerScribe::runCommand
void runCommand(MessageLoggerQ::OpCode opcode, void *operand) override
Definition: ThreadSafeLogMessageLoggerScribe.cc:70
ELseverityLevel.h
edm::service::ThreadSafeLogMessageLoggerScribe::m_statisticsDestControls
std::vector< std::shared_ptr< ELstatistics > > m_statisticsDestControls
Definition: ThreadSafeLogMessageLoggerScribe.h:132
edm::service::ThreadSafeLogMessageLoggerScribe::ConfigurableDefaults::noTimeStamps_
bool noTimeStamps_
Definition: ThreadSafeLogMessageLoggerScribe.h:65
edm::service::ThreadSafeLogMessageLoggerScribe::m_tooManyWaitingMessagesCount
std::atomic< unsigned long > m_tooManyWaitingMessagesCount
Definition: ThreadSafeLogMessageLoggerScribe.h:142
edm::ELextendedID::id
std::string id
Definition: ELextendedID.h:29
ConfigurationHandshake.h
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
edm::service::ThreadSafeLogMessageLoggerScribe::ConfigurableDefaults::COMMON_DEFAULT_LIMIT
static constexpr int COMMON_DEFAULT_LIMIT
Definition: ThreadSafeLogMessageLoggerScribe.h:55
edm::ELseverityLevel
Definition: ELseverityLevel.h:26
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
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
edm::service::ThreadSafeLogMessageLoggerScribe::~ThreadSafeLogMessageLoggerScribe
~ThreadSafeLogMessageLoggerScribe() override
Definition: ThreadSafeLogMessageLoggerScribe.cc:51
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
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
ThreadSafeLogMessageLoggerScribe.h
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
EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.cerr
cerr
Definition: EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.py:8
edm::RequireZeroOrMore
Definition: ParameterWildcardBase.h:17
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
edm::ELseverityLevel::ELsev_info
Definition: ELseverityLevel.h:38
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
edm::MessageLoggerQ::OpCode
OpCode
Definition: MessageLoggerQ.h:29
mps_fire.dest
dest
Definition: mps_fire.py:179
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
edm::service::ThreadSafeLogMessageLoggerScribe::ConfigurableDefaults::noLineBreaks_
bool noLineBreaks_
Definition: ThreadSafeLogMessageLoggerScribe.h:64