Coder Social home page Coder Social logo

Comments (4)

losalex avatar losalex commented on June 26, 2024

Thanks @Kamui123 for opening this issue. When you mentioned "Log json is printed as string", can you please share any screenshot how you see it in Log Explorer?

from java-logging-logback.

Kamui123 avatar Kamui123 commented on June 26, 2024

Sample entry
image

from java-logging-logback.

losalex avatar losalex commented on June 26, 2024

Thanks @Kamui123 for sharing the output from Log Explorer. Indeed, looking into code it seems we do not support today structured JSON payload and use ILoggingEvent. getFormattedMessage to retrieve string payload and embed it into a jsonPayload.
It seems that ILoggingEvent does not provide built-in support for JSON either, so the only way to make it work is to try to detect if given message string is actually a valid JSON (thus it could be converted and embedded into jsonPayload). I believe the only way to make it work today is by using LoggingEventEnhancer - this way you can add a custom code to detect if ILoggingEvent message is indeed JSON and if yes, you could replace jsonPayload field for LogEntry currently prepared by calling to LogEntry.Builder.setPayload with Payload.JsonPayload object (you can see tests on how Payload.JsonPayload can be created).

from java-logging-logback.

losalex avatar losalex commented on June 26, 2024

Closing this issue due to staleness and lack of response - feel free to reactivate or comment

from java-logging-logback.

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.