1

Using quarkus version 1.5.2.Final

LoggerFactory.getLogger("test").info(MarkerFactory.getMarker("TEST_MARKER"),"log statement");

This gets logged as :

2020-09-12 21:08:08,282 INFO [test] (executor-thread-1) log statement

I would also like to include TEST_MARKER in this logline. Unfortunately Quarkus logging guide doesn't even talk about markers. My application.properties looks like this

    quarkus.http.port=8181
quarkus.http.access-log.enabled=true
quarkus.resteasy.gzip.enabled=true
quarkus.native.additional-build-args =-H:ReflectionConfigurationFiles=reflection-config.json
microprofile.rest.client.disable.default.mapper=true
  • You can probably do something based on the underlying logging framework you are using. Like in Log4j, you could add your own custom appender. This SO post talks about that: https://stackoverflow.com/questions/44247698/how-to-modify-a-log4j2-message-before-it-is-logged – CryptoFool Sep 12 '20 at 15:57

0 Answers0