leaqui
leaqui

Reputation: 543

Quarkus REST client - How to configure a different ClientLogger

At https://es.quarkus.io/guides/rest-client-reactive#logging-traffic it states:

REST Client Reactive utilizes a default ClientLogger implementation. You can modify this by supplying a custom ClientLogger instance via CDI or when programmatically creating your client.

How can this be achieved through CDI?

I aim to create a ClientLogger that omits logging headers, as bearer tokens are transmitted through them.

Upvotes: 0

Views: 314

Answers (1)

leaqui
leaqui

Reputation: 543

From Quarkus 3.9 onwards, simply annotate your ClientLogger with either @Singleton or @ApplicationScoped.

Prior to Quarkus 3.9, additionally include @Unremovable.

For more information, refer to Make ClientLogger beans unremovable.

Upvotes: 0

Related Questions