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

Separate logging information from presentation #2398

Closed
Symbitic opened this issue Jun 28, 2022 · 1 comment
Closed

Separate logging information from presentation #2398

Symbitic opened this issue Jun 28, 2022 · 1 comment
Labels

Comments

@Symbitic
Copy link

Is your feature request related to a problem? Please describe.

One problem with the log module of the standard library is that it isn't scalable across module boundaries. Different modules may implement a different logging style (no color, different prefixes, etc). This makes it difficult for applications to present a consistent experience and discourages modules from emitting useful debug information.

I think it would be beneficial to separate the logging information from the presentation, thus delegating if/how to print messages to users. A command-line app may wish to print nothing but info messages and fatal errors, while a server app may want to print complex and formatted messages (including verbose debug messages).

Describe the solution you'd like.

I've been working on a port from the Qt C++ messaging framework. It's specifically designed to scale to hundreds (if not thousands of modules). By using categorized logging, applications have full control over which messages should be printed, and (if necessary), how to print them.

Describe alternatives you've considered.

I considered modifying the log module, but this would require breaking changes. The logging module may be used as a way of presenting messages from this module.

@iuioiua
Copy link
Contributor

iuioiua commented Dec 6, 2023

Closing this for the same reason as #2399. Thank you for your suggestion, either way. If there are any sentiments still for this, we can re-open this issue.

@iuioiua iuioiua closed this as not planned Won't fix, can't repro, duplicate, stale Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants