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

Write fields textformatter #3

Merged
merged 2 commits into from Feb 4, 2020

Conversation

@dfurtado
Copy link
Contributor

dfurtado commented Feb 4, 2020

To improve readability of the log while in development, it would be good to have the logs in text format.

Changes:

  • Skip setting the JSONFormatter by default when calling SetGlobalFields and WithScope methods, and use the Formatter that is set in the global logger instance instead.

  • Introduced a private function called writeFields which is called when using the TextFormatter and it will print in plain text format the keys and values of the Fields map.

dfurtado added 2 commits Feb 4, 2020
To improve readability of the log while in development, it would be good to
have the logs in text format.

Changes:
- Skip setting the JSONFormatter by default when calling SetGlobalFields and
WithScope methods, and use the formatter that is set in the global logger
instance instead.

- Introduced a private function called writeFields which is called when
using the Textformatter and it will print in plain text format the keys
and values of the Fields map.
Removed this code since it has been moved over its own function.
@dfurtado dfurtado requested a review from ConsulFirmin Feb 4, 2020
@ConsulFirmin ConsulFirmin merged commit 06293a0 into vargspjut:master Feb 4, 2020
@dfurtado dfurtado deleted the dfurtado:write-fields-textformatter branch Feb 4, 2020
@dfurtado

This comment has been minimized.

Copy link
Contributor Author

dfurtado commented Feb 4, 2020

Thanks @ConsulFirmin ! Could you please create a release?

@ConsulFirmin

This comment has been minimized.

Copy link
Member

ConsulFirmin commented Feb 4, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.