-
Notifications
You must be signed in to change notification settings - Fork 264
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
Allow logger name customization #1979
Labels
Comments
You can write your own HttpLogWriter. If I'm not mistaken you will have
access to the request/response. You can take the default as a starting
point. Then I'd say, you can pick a logger name based on the the host name
or whatever. You can also add attributes or MDC properties which you can
then use later for filtering.
I don't believe this needs to be added to the core.
…On Sun, Dec 15, 2024, 20:38 Dmitrii ***@***.***> wrote:
I would like to have the ability to customize logger name.
Detailed Description Context
For example, I have 2 outgoing intergrations and 2 feign clients:
FeignClientA, FeignClientB.
In some moment I need logs for FeignClientA for debugging.
I would like to enable trace logs for FeignClientA, but don't enable for
FeignClientB.
Like this:
logging.level.FeignClientA: TRACE
logging.level.FeignClientB: INFO
Right now I can only enable trace logs globally with logging.level.org.zalando.logbook:
TRACE. It will enable logs for everything and I can overload logs storage.
It also could be usefull if we have logbook logging for incoming and
outgoing requests, It would be possible to enable logs separatly.
Possible Implementation
Let to inject logger into log writer: DefaultHttpLogWriter,
LogstashLogbackSink ...
Your Environment
- Version used:
- Link to your project:
—
Reply to this email directly, view it on GitHub
<#1979>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADI7HOZT24JUHZOBI43WJ32FXLETAVCNFSM6AAAAABTU2UC6GVHI2DSMVQWIX3LMV43ASLTON2WKOZSG42DAOBUG43DMMI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
If what you're trying to achieve is to be able to disable calls of specific clients, or outgoing/incoming requests only, you can use condition. In case of Spring Boot, it'll be as simple as definnig a bean of |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I would like to have the ability to customize logger name.
Detailed Description
Context
For example, I have 2 outgoing intergrations and 2 feign clients: FeignClientA, FeignClientB.
In some moment I need logs for FeignClientA for debugging.
I would like to enable trace logs for FeignClientA, but don't enable for FeignClientB.
Like this:
Right now I can only enable trace logs globally with
logging.level.org.zalando.logbook: TRACE
. It will enable logs for everything and I can overload logs storage.It also could be usefull if we have logbook logging for incoming and outgoing requests, It would be possible to enable logs separatly.
Possible Implementation
Let to inject logger into log writer: DefaultHttpLogWriter, LogstashLogbackSink ...
Your Environment
The text was updated successfully, but these errors were encountered: