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

Possibility to mute/implement default client logger #445

Closed
chloyka opened this issue Sep 11, 2023 · 1 comment
Closed

Possibility to mute/implement default client logger #445

chloyka opened this issue Sep 11, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@chloyka
Copy link

chloyka commented Sep 11, 2023

Is your feature request related to a problem? Please describe.
I think it's necessary to provide the ability to override the default logger for the client. The main issue is that in most cases, there's no need to see logs like "using traceparent..." and so on, especially in a production environment.

Even if such a need arises, in most cases, it's necessary to have the ability to customize the message format.

Describe the solution you'd like
I suggest using the interface for the default logger like this:

type Logger interface {
	Printf(format string, v ...any)
	Print(v ...any)
	Println(v ...any)
	Fatal(v ...any)
	Fatalf(format string, v ...any)
	Fatalln(v ...any)
	Panic(v ...any)
	Panicf(format string, v ...any)
	Panicln(v ...any)
}

Also add setter, default logger fallback and possibility to discard logs with default logger.

PS.
Can do it and make PR, because i already implemented some things

@chloyka chloyka added the enhancement New feature or request label Sep 11, 2023
@mikeee
Copy link
Member

mikeee commented Feb 14, 2024

#496 now provides the requested functionality

@mikeee mikeee closed this as completed Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants