Skip to content

Commit

Permalink
Added Tracer option to stop MessageLogger reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
Dr15Jones committed Nov 2, 2023
1 parent 5297e7e commit 97eac6e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions FWCore/Services/plugins/Tracer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,8 @@ Tracer::Tracer(ParameterSet const& iPS, ActivityRegistry& iRegistry)
dumpEventSetupInfo_(iPS.getUntrackedParameter<bool>("dumpEventSetupInfo")) {
tracer::setupFile(iPS.getUntrackedParameter<std::string>("fileName"), iRegistry);

if (not iPS.getUntrackedParameter<bool>("useMessageLogger"))
return;
for (std::string& label : iPS.getUntrackedParameter<std::vector<std::string>>("dumpContextForLabels"))
dumpContextForLabels_.insert(std::move(label));

Expand Down Expand Up @@ -480,6 +482,8 @@ void Tracer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
->setComment(
"Prints info 3 times when an event setup cache is filled, before the lock, after the lock, and after "
"filling");
desc.addUntracked<bool>("useMessageLogger", true)
->setComment("If true, information is sent via the MessageLogger. Only use false if `fileName` is used.");
desc.addUntracked<std::string>("fileName", "")
->setComment("If fileName is given, write a compact representation of tracer info to the file.");
descriptions.add("Tracer", desc);
Expand Down

0 comments on commit 97eac6e

Please sign in to comment.