quarkiverse / quarkus-logging-json

Quarkus logging extension outputting the logging in json.
Apache License 2.0
62 stars 28 forks source link

Import in pom.xml and issue with JSON enablement #265

Closed PatLechevallier closed 11 months ago

PatLechevallier commented 11 months ago

Hi here,

Thank you for the work. It's much appreciated. i would like to have some help, I am using Quarkus 2.16.5.Final:

<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
<quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
<quarkus.platform.version>2.16.5.Final</quarkus.platform.version>

I am lost between io.quarkus and io.quarkiverse.loggingjson, which one should I import ?

<dependency>
      <groupId>io.quarkiverse.loggingjson</groupId>
      <artifactId>quarkus-logging-json</artifactId>
      <version>2.0.1</version>
</dependency>

After some trials and fails, I am using the one above which seems to be more suitable. The documentation seems wrong here: https://quarkus.io/version/2.16/guides/logging

And the readme here doesn't help, the application.properties doesn't seem to work.

This property (from the doc https://quarkus.io/version/2.16/guides/logging )is not recognized in io.quarkiverse: quarkus.log.console.json=false

This property is recognized in io.quarkiverse but doesn't have any effect, true or false there the JSON logging is deactivated: quarkus.log.json.console.enable=true or false

However, when I remove this property, the JSON logging is activated by default!

What's your thoughts on this ? Thank you. Best Regards

GinaGeorgescul commented 11 months ago

Hello, If you have decided on using the quarkiverse extension, then the information from https://quarkus.io/version/2.16/guides/logging has no relevance, as they are 2 different things. This is the documentation for the quarkiverse extension: http://docs.quarkiverse.io/quarkus-logging-json/dev/index.html (quarkus.log.json.console.enable is true by default)

PatLechevallier commented 11 months ago

Alright thank you. I am closing the issue, I will re open one when I will have to investigate the issue with the config property