-
Notifications
You must be signed in to change notification settings - Fork 58
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
[FEATURE] Pretty-print logging #237
Comments
Hi, can I be assigned this issue in case no one else is working on it, or should I directly submit my PR? |
[FEATURE] Pretty-print logging open-feature#237 Signed-off-by: Mihir Mittal <105881639+mihirm21@users.noreply.github.com>
[FEATURE] Pretty-print logging open-feature#237 Signed-off-by: Mihir Mittal <105881639+mihirm21@users.noreply.github.com>
Is the issue resolved now ? |
Ive requested changes in the PR |
are you asking for changes in source files of zap encoder? other than that, I am not getting where to add this feature, plz help |
You can introduce a new cli flag in This way we set the default to |
how do I pass this value(viper.GetString(flag name)) to the zap.config encoding parameter |
One option is to update the
or update the
and apply the remaining default values within the
logger.go:
I am sure there are other options as well if you decide to take a different route |
Is the issue resolved now? |
Hi @mihirm21, the issue will automatically be resolved once your PR is accepted and merged. Thanks for your contributions to the project! |
Requirements
Flagd currently prints structured logs in json format, when running flagd in the console this can cause the logs to be difficult to read.
the zap logger
zap.Config
struct contains the fieldEncoding
which when set toconsole
instead ofjson
updates the logging structure as follows:json
console
This behaviour should be controlled via a viper flag,
e.g.e.g.--log-encoding=console
with ajson
default--log-encoding=json
with aconsole
defaultThe text was updated successfully, but these errors were encountered: