Skip to content

Add spdlog as logging interface

Schrödter, Tobias requested to merge 82-add-logger into master

Adds logging with spdlog, which results in log messages as:

[main.cpp:53:main][info] info
[main.cpp:54:main][warning] warning
[main.cpp:55:main][error] error

where the first parts are: file:line number:function, then the log level (info, warning, error) and in the end the actual message.

Starting PeTrack now yields:

[main.cpp:174:main][info] Starting PeTrack
[main.cpp:175:main][info] Version: 0.9.3
[main.cpp:176:main][info] Commit id: CroMa-112-g76760202-dirty
[main.cpp:177:main][info] Commit date: Mon Nov 28 13:11:52 2022
[main.cpp:178:main][info] Build from branch: 82-add-logger
[main.cpp:179:main][info] Compile date: Fri Nov 25 11:13:52 2022
[main.cpp:180:main][info] Build with: clang++ (13.0.0)

Reviewer Checklist

General code quality

  • naming conventions are met (see .clang-tidy for detailed information)
  • no static analyzer warnings in new code parts (e.g., use clang-tidy for checking)

General usability

  • old versions of pet-files are still loadable

Only if changes in UI

  • new elements are also saved and loaded from pet-file
  • check if tab order is still correct
  • all new SpinBoxes are promoted
  • new keybindings added to Petrack::keyBindings()
Edited by Schrödter, Tobias

Merge request reports