-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Support configurable delimiter for console encoder #697
Conversation
Codecov Report
@@ Coverage Diff @@
## master #697 +/- ##
=======================================
Coverage 98.35% 98.35%
=======================================
Files 43 43
Lines 2366 2368 +2
=======================================
+ Hits 2327 2329 +2
Misses 32 32
Partials 7 7
Continue to review full report at Codecov.
|
Not getting into a deep/full review at this point, but directionally: we probably don't want to add new ways of configuring zap (e.g. environment variable conventions like this). Instead this should just be directly added to the console encoder config, and then integration with environment can be done by the application. |
@jcorbin Agree! env control should done at end-user application. I have made delimiter in encode config, please have a look. thanks. |
@jcorbin or anyone, could you help to take a look this PR please? |
* master: README: Switch to travis-ci.com for badge (uber-go#709) Fix changelog links for 675 Prep for 1.10.0 release, update CHANGELOG (uber-go#705) Add Go 1.12 for Travis (uber-go#707) Fix call depth of standard logger in go1.12 (uber-go#706) Fix inconsistency between MapObjectEncoder's AddByteString and AppendByteString (uber-go#657) Disable HTMLEscape in reflect JSON encoder (uber-go#704)
@jcorbin Thanks for your details review comments, I updated code, Please have another look |
@jcorbin Any chance to have another look? |
@abhinav @prashantv @jcorbin Could you please have a look? |
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.
The implementation largely looks fine. Left comments about the tests and a
little about the documentation. Would you mind updating the PR description to
reflect the new changes, please?
Thanks for the change!
@lixingwang @abhinav Seems like this PR has stalled. Happy to pick up the change unless either of you has objections/plans to complete it 😄 |
@vosst thanks for reminding. I am totally lost this PR. let me update it in the coming days. |
Nice, thank you 😄 @prashantv @jcorbin @abhinav probably worth taking another look. |
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.
Couple of minor comments on the test, but otherwise looks good, thanks!
Co-authored-by: Prashant Varanasi <github@prashantv.com>
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.
LGTM besides minor suggestions.
Co-authored-by: Abhinav Gupta <mail@abhinavg.net>
Co-authored-by: Abhinav Gupta <mail@abhinavg.net>
Co-authored-by: Abhinav Gupta <mail@abhinavg.net>
It would be nice to have a configurable delimiter for console encoder, tab by default. For our cases, we prefer to have space as element delimiter. A custom console delimiter can be set through the `consoleSeparator` encoder configuration.
It would be nice to have a configurable delimiter for console encoder, tab by default.
For our cases, we prefer to have space as element delimiter.
A custom console delimiter can be set through the
consoleSeparator
encoder configuration.