Coder Social home page Coder Social logo

Comments (6)

dfa1 avatar dfa1 commented on July 19, 2024 1

Closing the issue: solved the problem in another way.

from quarkus-logging-json.

dfa1 avatar dfa1 commented on July 19, 2024

ah looks like I should use "-" to separate words. This is working fine:

quarkus.log.console.json.fields.timestamp.enabled=false
quarkus.log.console.json.fields.sequence.enabled=false
quarkus.log.console.json.fields.logger-class-name.enabled=false
quarkus.log.console.json.fields.logger-name.enabled=false
quarkus.log.console.json.fields.level.enabled=false
quarkus.log.console.json.fields.message.enabled=false
quarkus.log.console.json.fields.thread-name.enabled=false
quarkus.log.console.json.fields.thread-id.enabled=false
quarkus.log.console.json.fields.process-id.enabled=false
quarkus.log.console.json.fields.process-name.enabled=false
quarkus.log.console.json.fields.hostname.enabled=false
quarkus.log.console.json.fields.mdc.enabled=false
quarkus.log.console.json.fields.ndc.enabled=false
quarkus.log.console.json.fields.stack-trace.enabled=false
quarkus.log.console.json.fields.arguments.enabled=false

from quarkus-logging-json.

dfa1 avatar dfa1 commented on July 19, 2024

would it be possible to have single switch to disable all fields with a single @ConfigItem? (or any other way to get full control of the output)

In my use-case I must create JSON that is valid against a given schema: any extra field added by a new version of this library, will cause hard to track issues.

from quarkus-logging-json.

DGuhr avatar DGuhr commented on July 19, 2024

hey @dfa1 @SlyngDK - just a question, bc maybe I understood it wrong: Is it also possible to disable those fields in the default logger, or do I need to create a custom jsonProvider for that? Would actually be nice to be able to control what fields are spit out by the json logs, but setting e.g.

quarkus.log.console.json.fields.ndc.enabled=false which we don't use for Keycloak, leads to:

{"timestamp":"2022-02-15T12:28:30.111+01:00","sequence":1,"loggerClassName":"org.jboss.logging.Logger","loggerName":"io.quarkus.config","level":"WARN","message":"Unrecognized configuration key \"quarkus.log.console.json.fields.ndc.enabled\" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo","threadName":"main","threadId":1,"mdc":{},"ndc":"","hostName":"dguhr-mac","processName":"QuarkusEntryPoint","processId":10082}

Trying to get rid of mdc/ndc here ;)

Context: I want to provide a wrapper in our config log-json-fields-disabled="..." where people could add a comma-separated list of the fields they don't want in the json logs. Using quarkus 2.7.0 and the mvn package from io.quarkus.

from quarkus-logging-json.

SlyngDK avatar SlyngDK commented on July 19, 2024

@DGuhr This extension has nothing to do with to default quarkus json logging.
This extension supports more customization, but you have to replace and use this extension.
All config options can be found here https://quarkiverse.github.io/quarkiverse-docs/quarkus-logging-json/dev/index.html

from quarkus-logging-json.

DGuhr avatar DGuhr commented on July 19, 2024

uargh, my bad, sorry then :)

from quarkus-logging-json.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.