Quarkus REST client - How to configure a different ClientLogger

62 views Asked by At

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.

1

There are 1 answers

0
leaqui On

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.