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

feat: remove custom hook for zerolog #48

Merged
merged 9 commits into from
Jan 28, 2024
Merged

Conversation

lovung
Copy link
Collaborator

@lovung lovung commented Jan 27, 2024

What type of PR is this?

  • Remove custom hook function.
  • Un-expose Otel keys.

What this PR does / why we need it (English/Chinese):

Unnecessary.

Which issue(s) this PR fixes:

N/A

@rogerogers
Copy link
Collaborator

rogerogers commented Jan 27, 2024

The logger library already has a defined entry for the hook, I think there is no need to add another one here.

@lovung
Copy link
Collaborator Author

lovung commented Jan 27, 2024

The logger library already has a defined entry for the hook, I think there is no need to add another one here.

@rogerogers OK. Then let me remove config.hookFn

@lovung lovung changed the title feat: add WithHook to customize the hook function for zerolog feat: remove custom hook for zerolog Jan 27, 2024
@lovung lovung self-assigned this Jan 27, 2024
@rogerogers
Copy link
Collaborator

In addition, the implementation of this hook form should reference the implementation of the logrus hook form. Here, overloading of the + hook is executed twice, thus this overloading is unnecessary and should be removed.

func (l *Logger) CtxLogf(level hlog.Level, ctx context.Context, format string, kvs ...any) {

@lovung
Copy link
Collaborator Author

lovung commented Jan 27, 2024

@rogerogers I have just removed duplicate overloading.

@rogerogers rogerogers merged commit 8239b48 into hertz-contrib:main Jan 28, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants