Skip to content

Commit

Permalink
MessageLogger no longer prints summary by default
Browse files Browse the repository at this point in the history
The option is still available to turn on in the configuration.
Always print number of dropped messages if any were dropped.
  • Loading branch information
Dr15Jones committed Jul 20, 2022
1 parent 664cfd9 commit 85ab8e7
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ got data of type "edmtest::Doodad" with name "abcd" in record GadgetRcd
++++++++ finished: processing esmodule: label = '' type = DoodadESSource in record = GadgetRcd
got data of type "edmtest::Doodad" with name "abc" in record GadgetRcd
got data of type "edmtest::Doodad" with name "abc" in record GadgetRcd
25 Tracer -s DoodadESSource:D 4 4
9 changes: 9 additions & 0 deletions FWCore/MessageService/src/ThreadSafeLogMessageLoggerScribe.cc
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,15 @@ namespace edm {
if (m_statisticsResets[i])
m_statisticsDestControls[i]->wipe();
}
auto dropped = m_tooManyWaitingMessagesCount.load();
if (m_statisticsDestControls.empty() and dropped != 0) {
if (m_stream_ps.find("cerr") != m_stream_ps.end()) {
std::cerr << "MessageLogger: dropped waiting message count " << dropped << "\n";
}
if (m_stream_ps.find("cout") != m_stream_ps.end()) {
std::cout << "MessageLogger: dropped waiting message count " << dropped << "\n";
}
}
}

void ThreadSafeLogMessageLoggerScribe::triggerFJRmessageSummary(std::map<std::string, double>& sm) // ChangeLog 29
Expand Down
1 change: 1 addition & 0 deletions FWCore/MessageService/test/u20_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
noTimeStamps = cms.untracked.bool(True)
)
process.MessageLogger.cerr.noTimeStamps = True
process.MessageLogger.cerr.enableStatistics = True

process.maxEvents = cms.untracked.PSet(
input = cms.untracked.int32(1)
Expand Down
2 changes: 1 addition & 1 deletion FWCore/ParameterSet/python/Config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2397,7 +2397,7 @@ def testProcessDumpPython(self):
limit = cms.untracked.int32(10000000)
),
enable = cms.untracked.bool(True),
enableStatistics = cms.untracked.bool(True),
enableStatistics = cms.untracked.bool(False),
lineLength = cms.optional.untracked.int32,
noLineBreaks = cms.optional.untracked.bool,
noTimeStamps = cms.untracked.bool(False),
Expand Down
2 changes: 1 addition & 1 deletion FWCore/ParameterSet/python/MessageLogger.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
default = _default_pset.clone(),
cerr = _destination_base.clone(
enable = untracked.bool(True),
enableStatistics = untracked.bool(True),
enableStatistics = untracked.bool(False),
resetStatistics = untracked.bool(False),
statisticsThreshold = untracked.string('WARNING'),
INFO = untracked.PSet(
Expand Down

0 comments on commit 85ab8e7

Please sign in to comment.