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

Add support of printf()-like formatting to MessageLogger #30629

Closed
wants to merge 3 commits into from

Conversation

fwyzard
Copy link
Contributor

@fwyzard fwyzard commented Jul 10, 2020

PR description:

Following the discussion in #30463 this PR implements printf-style formatting for the MessageLogger objects.
The syntax is, for example: edm::LogInfo(category).printf(format, ...).

The implementation reuses the {fmt} library introduced in #30626.

PR validation:

Unit tests run and pass.

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-30629/16897

Code check has found code style and quality issues which could be resolved by applying following patch(s)

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@fwyzard
Copy link
Contributor Author

fwyzard commented Jul 10, 2020

@cmsbuild, please test

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-30629/16898

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 10, 2020

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @fwyzard (Andrea Bocci) for master.

It involves the following packages:

FWCore/MessageLogger
FWCore/MessageService

@makortel, @smuzaffar, @cmsbuild, @Dr15Jones can you please review it and eventually sign? Thanks.
@makortel, @wddgit this is something you requested to watch as well.
@silviodonato, @dpiparo you are the release manager for this.

cms-bot commands are listed here

@makortel
Copy link
Contributor

MessageLogger has always used the formatting encouraged by C++ standard. The future standard is encouraging std::format(). Of course people are free to use fmt::sprintf(), although that would make it less straightforward to eventually remove {fmt} when std::format() becomes supported by all std implementations we use (at that time).

@fwyzard
Copy link
Contributor Author

fwyzard commented Jul 10, 2020

That doesn't mean that people shouldn't be given the freedom to use the formatting they are more comfortable with - see all the uses of sprintf and boost::format vs nobody asking for std::format-like capabilities.

@cmsbuild
Copy link
Contributor

-1

Tested at: 58a3ab1

CMSSW: CMSSW_11_2_X_2020-07-09-2300
SCRAM_ARCH: slc7_amd64_gcc820
You can see the results of the tests here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-d40a14/7846/summary.html

I found follow errors while testing this PR

Failed tests: UnitTests

  • Unit Tests:

I found errors in the following unit tests:

---> test TestFWCoreServicesDriver had ERRORS

@fwyzard fwyzard changed the base branch from CMSSW_11_2_X to master July 14, 2020 17:02
@cmsbuild cmsbuild mentioned this pull request Jul 29, 2020
@smuzaffar smuzaffar modified the milestones: CMSSW_11_2_X, CMSSW_11_3_X Nov 26, 2020
@cmsbuild cmsbuild modified the milestones: CMSSW_11_3_X, CMSSW_12_0_X Apr 15, 2021
@smuzaffar smuzaffar modified the milestones: CMSSW_12_0_X, CMSSW_12_1_X Jul 30, 2021
@smuzaffar smuzaffar modified the milestones: CMSSW_12_1_X, CMSSW_12_2_X Oct 29, 2021
@smuzaffar smuzaffar modified the milestones: CMSSW_12_2_X, CMSSW_12_3_X Dec 6, 2021
@smuzaffar smuzaffar modified the milestones: CMSSW_12_3_X, CMSSW_12_4_X Mar 11, 2022
@qliphy
Copy link
Contributor

qliphy commented Mar 14, 2022

Summary of the discussion at the Core Software meeting: "we just don't want to support this, independently of any technical or implementation issue".

closing this PR now. Please open a new one if needed.

@qliphy qliphy closed this Mar 14, 2022
@fwyzard
Copy link
Contributor Author

fwyzard commented Mar 15, 2022

Moved to #37244 and #37245 .

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

Successfully merging this pull request may close these issues.

None yet

5 participants