-
Notifications
You must be signed in to change notification settings - Fork 572
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
Proposal: A customizable ConsoleWriter output #84
Comments
Yes, as long as it is backward compatible. |
...and does not add extra dependencies. |
Hi, understood about dependencies, but can you be more specific about "backwards compatibility" — as far as I understand it, the output type is just |
Just make sure that the current API of the ConsoleWriter still works. Seems like it should not be an issue with the way you pass configuration. |
In order to allow customizing the console output, the `zerolog.ConsoleWriter` output has been refactored, with the formatting logic extracted to separate functions in `consoleFormatters`, and with the `SetFormatter()` method to re-define the defaults. Also, the default has been changed to be more sparse and visually attractive. The logic has been extracted from an external prototype package at <https://github.com/karmi/consolelog>. A comprehensive example has been added to the README, and a number of tests has been added as well. Closes rs#84
In order to allow customizing the console output, the `zerolog.ConsoleWriter` output has been refactored, with the formatting logic extracted to separate functions in `consoleFormatters`, and with the `SetFormatter()` method to re-define the defaults. Also, the default has been changed to be more sparse and visually attractive. The logic has been extracted from an external prototype package at <https://github.com/karmi/consolelog>. A comprehensive example has been added to the README, and a number of tests has been added as well. Closes rs#84
In order to allow customizing the console output, the `zerolog.ConsoleWriter` output has been refactored, with the formatting logic extracted to separate functions in `consoleFormatters`, and with the `SetFormatter()` method to re-define the defaults. Also, the default has been changed to be more sparse and visually attractive. The logic has been extracted from an external prototype package at <https://github.com/karmi/consolelog>. A comprehensive example has been added to the README, and a number of tests has been added as well. Closes rs#84
In order to allow customizing the console output, the `zerolog.ConsoleWriter` output has been refactored, with the formatting logic extracted to separate functions in `consoleFormatters`, and with the `SetFormatter()` method to re-define the defaults. Also, the default has been changed to be more sparse and visually attractive. The logic has been extracted from an external prototype package at <https://github.com/karmi/consolelog>. A comprehensive example has been added to the README, and a number of tests has been added as well. Closes rs#84
In order to allow customizing the console output, the `zerolog.ConsoleWriter` output has been refactored, with the formatting logic extracted to separate functions in `consoleFormatters`, and with the `SetFormatter()` method to re-define the defaults. Also, the default has been changed to be more sparse and visually attractive. The logic has been extracted from an external prototype package at <https://github.com/karmi/consolelog>. A comprehensive example has been added to the README, and a number of tests has been added as well. Closes rs#84
Hello, I've recently used
zerolog
in a project, and I like it very much — many thanks!One thing I wanted to change was the
ConsoleWriter
output: I wanted to format the output differently, I wanted to highlight field values, not field names, etc. So I wrote a custom implementation, looking like this (adapting the output fromzerolog
's README):I've realized that my needs are probably not unique (see #34), and that it would be nice to expose a customizable
ConsoleWriter
. Therefore, I've extracted what I did in the project into a library, available at https://github.com/karmi/consolelog, since I didn't want to just blindly send code your way.My question is: is this something you would consider interesting to have in the
zerolog
library itself? If so, I can move the implementation into a patch and send a pull request.The text was updated successfully, but these errors were encountered: