-
Notifications
You must be signed in to change notification settings - Fork 52
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
Logging Tweaks, main branch (2025.02.27.) #898
Logging Tweaks, main branch (2025.02.27.) #898
Conversation
Most importantly it would be one that would split multi-line log messages during the output construction. And it would use longer source names in the printout by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this design a lot. 👍
b0e465f
to
2d49cf0
Compare
Forgot to move the help printout to the logger previously. Now it looks like:
Though it's a fair debate whether this is helping or not... 🤔 |
Stopped the helper classes from using std::cout directly, re-directing their output into a multi-line string instead. Which would then be given to a logger.
2d49cf0
to
b118bb0
Compare
|
Since we're anyway having a heated debate about logging in #897 already, let me throw some oil on that fire with this PR.
I'm basically reviving some ideas from #837 in this one. So that the configuration of the applications would get printed in a (to me...) nice way, using the logging infrastructure. Going from the current:
To:
The one new trick I have in this PR compared to #837 is the
split_output_decorator
class. That would allow us to pass multi-line strings to the logger, and have them appear in a (to me) pleasing fashion.We will still need to update a number of places in the code to make everything end up in the loggers, but I think
split_output_decorator
will help us with a number of other places as well. (For instance with how Detray prints messages of its own.)