Skip to content

Support JSON Logging capability #1171

Open
@donatelloOo

Description

@donatelloOo

Issue submitter TODO list

  • I've searched for an already existing issues here
  • I'm running a supported version of the application which is listed here and the feature is not present there

Is your proposal related to a problem?

It's not possible to produce logs with custom JSON format.
It would be great to allow smooth integration with cluster's logging stack.

Note: the JSON format must be configurable (so the standard logback JSON output is not enough)

  • Using logback, the following dependency is missing to allow configuring JSON encoder:

    <dependency>
        <groupId>net.logstash.logback</groupId>
        <artifactId>logstash-logback-encoder</artifactId>
    </dependency>
    

    see https://springframework.guru/json-logging-with-spring-boot/

  • Using log4j2, the whole log4j2 slf4j impl + json layout support is missing (maybe by choice):

      <dependency>
          <groupId>org.apache.logging.log4j</groupId>
          <artifactId>log4j-slf4j2-impl</artifactId>
      </dependency>
      <dependency>
          <groupId>org.apache.logging.log4j</groupId>
          <artifactId>log4j-layout-template-json</artifactId>
      </dependency>
    

    https://logging.apache.org/log4j/2.x/manual/json-template-layout.html

Describe the feature you're interested in

Add Custom JSON logging capability using Logback or Log4j2.

Describe alternatives you've considered

No response

Version you're running

1.5.0 helmchart / 1.2.0 image

Additional context

the spring boot integration with log4j is very easy if specifying for instance:

  logging:
    config: "/kafka-ui/log4j2.yaml"

Metadata

Metadata

Assignees

Labels

scope/backendRelated to backend changesstatus/triage/completedAutomatic triage completedtype/enhancementEn enhancement/improvement to an already existing feature

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions