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

Add an option to disable errorVerbose #1487

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

makotonakai
Copy link

@makotonakai makotonakai commented Jan 30, 2025

This PR adds disableErrorVerbose option to Logger type.
This option allows users to disable the output of error verbose when they use pkg/errors.

Closes #650 #1168

Integer int64
String string
Interface interface{}
DisableErrorVerbose bool
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We avoid adding new struct fields to the Field type for performance reasons, as the struct is passed as a value.

We could add a new FieldType to indicate an error that should only have the message included, though that could have backwards compatibility concerns with some encoders.

Copy link
Author

@makotonakai makotonakai Feb 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@prashantv

I appreciate your feedback. I will create a new type with error field and DisableErrorVerbose field.

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

Successfully merging this pull request may close these issues.

Expose the ability to disable errorVerbose via logger config
2 participants