-
-
Notifications
You must be signed in to change notification settings - Fork 82
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
Update logging to use C++ strings, try to get rid of log.h #1182
Comments
@rdmark Just in case you (or somebody else, of course) can spare some time: If everything goes to plan (also see #1213) I will create a PR for #1179 and then #1182 next week. #1182 includes all changes from #1179. I have cleaned up a lot of code (except for the legacy stuff), and by making better use of C++ features (not only C++-20 but also older) rather tricky SonarQube issues have been resolved and the code volume has decreased without losing functionality. Based on my changes I could also improve the test coverage and reduce the object dependencies. There are also some minor bug fixes, which would not have justified a separate ticket. |
@uweseimet Thanks for the heads up! This week I'm in the middle of preparing a move from Seattle to Tokyo (for work) so I won't have time for piscsi for some time, unfortunately. Once I'm settled down, maybe 2-3 months later, I'll lean back into the project and see what I can do to help. |
@rdmark Seattle to Tokyo, wow! I hope everything works as planned. |
This should be addressed after the bookworm related changes have been committed in order to avoid merge conflicts (see #1179).
The spdlog logging methods (spdlog::info, spdlog::debug etc.) accept C++ strings/string_views as arguments. This means that instead of
just like with any other library we can just write
There is no need for using macros, format strings, varargs or a static buffer for log messages, and log.h most likely becomes obsolete. Note that current versions of C++ in general aim at reducing the need for using macros.
In addition, a convenience function like
shall be introduced.
The text was updated successfully, but these errors were encountered: