How to setup Quarkus KeyValueStructuredArgument not working?

Viewed 23

I want to log in a json format .

I am importing this.

import static io.quarkiverse.loggingjson.providers.KeyValueStructuredArgument.kv;

LOG.info("Some Error!{}", kv("key", "value"));

I would expect some json to be printed but it seems instead toString() method of kv() is called.

{
  "message": "Some error",
  "key": "value"
}
0 Answers
Related