Skip to content

Conversation

@rbx
Copy link
Member

@rbx rbx commented Aug 22, 2019

  • Introduce two new log calls:
    • LOGF(severity, ...) The arguments are given to fmt::format and the result is logged, e.g. LOGF(info, "Hello {}!", "world");
    • LOGP(severity, ...) The arguments are given to fmt::printf and the result is logged, e.g. LOGP(info, "Hello %s!", "world");
  • Use fmt internally instead of ostringstream (where applicable) and std::localtime for better performance.
  • New log call LOGN(severity) that outputs an empty line (ping @fuhlig1).
  • New log call LOGV(severity, verbosity) that allows to override current verbosity just for the current call.
  • Various small optimizations.

The fmt library is bundled with the code (version 5.3.0), but users can override this by providing an external fmt installation via -DUSE_EXTERNAL_FMT=ON -DFMT_ROOT=/fmt/location. If fmt is external, projects that use FairLogger need to find fmt.

@ktf Solves #16.

@rbx rbx requested a review from dennisklein August 22, 2019 12:26
@ktf
Copy link
Contributor

ktf commented Aug 22, 2019

Cute! Thanks.

@rbx rbx force-pushed the logger-update branch 9 times, most recently from cf60c04 to ec2540f Compare August 26, 2019 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants