Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Look for a way to reject non-framework INFO messages earlier #31759

Closed
makortel opened this issue Oct 12, 2020 · 7 comments
Closed

Look for a way to reject non-framework INFO messages earlier #31759

makortel opened this issue Oct 12, 2020 · 7 comments

Comments

@makortel
Copy link
Contributor

This issue is motivated by #31757. The default MessageLogger configuration sets the message threshold to INFO

threshold = cms.untracked.string('INFO')

(likely) because the FwkReport and FwkSummary messages are INFO
if (isInfoEnabled()) {
LogVerbatim("FwkReport") << "Begin processing the " << readCount_ << suffix(readCount_) << " record. Run "
<< eventID.run() << ", Event " << eventID.event() << ", LumiSection "
<< eventID.luminosityBlock() << " on stream " << streamID.value() << " at "
<< std::setprecision(3) << TimeOfDay();
}

LogVerbatim("FwkSummary") << "";

The default limit of INFO messages is set to 0
INFO = cms.untracked.PSet(
limit = cms.untracked.int32(0)
),

A downside of this approach (as demonstrated by #31757) is that MessageLogger gets many INFO messages that get filtered out later. We should look for a way to reject the INFO messages earlier, but still keep the FwkReport and FwkSummary printed out by default.

@makortel
Copy link
Contributor Author

assign core

@cmsbuild
Copy link
Contributor

New categories assigned: core

@Dr15Jones,@smuzaffar,@makortel you have been requested to review this Pull request/Issue and eventually sign? Thanks

@cmsbuild
Copy link
Contributor

A new Issue was created by @makortel Matti Kortelainen.

@Dr15Jones, @dpiparo, @silviodonato, @smuzaffar, @makortel, @qliphy can you please review it and eventually sign/assign? Thanks.

cms-bot commands are listed here

@makortel
Copy link
Contributor Author

(based on a chat with @Dr15Jones)

A general approach would be to use the message categories to reject the other than FwkReport and FwkSummary messages early (the necessary information is in the configuration). On other other hand, doing a "contains" check on a "set of strings" on every LogInfo call sounds potentially expensive.

A faster alternative could be to introduce a "FWK Info" message level between WARNING and INFO (reserving it purely for framework usage; either "hacking" it internally, or making it visible outside framework as well). This approach would allow to

  • keep the current behavior of being able suppress FwkReport and FwkSummary messages by setting the default threshold to WARNING
  • reject non-framework INFO messages early on (with callback style call also the string formatting would be skipped)

@makortel
Copy link
Contributor Author

This was implemented in #31815

@makortel
Copy link
Contributor Author

+1

@cmsbuild
Copy link
Contributor

This issue is fully signed and ready to be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants