Coder Social home page Coder Social logo

Comments (6)

stof avatar stof commented on July 18, 2024

Please fix your markdown to use code-blocks when necessary, to avoid the escaping of the content. The link to the markdown help is available both in the footer of the github website and near the comment form

from monolog.

stof avatar stof commented on July 18, 2024

and btw, in which place does it create invalid json ? LineFormatter is not meant to produce json (there is a JsonFormatter for that)

from monolog.

jrjohnson avatar jrjohnson commented on July 18, 2024

LineFormater produces JSON in convertToString which gets called in format for every value in extras. It looks to me like the written output of extras is intended to be JSON.

from monolog.

stof avatar stof commented on July 18, 2024

@jrjohnson it uses json_encode in some cases (note that it is not all cases), because it is a readable way to write arrays on 1 line. But it was never intended to write json. If you want to log as JSON, use the dedicated formatter

from monolog.

jrjohnson avatar jrjohnson commented on July 18, 2024

OK so the extras string is just a comma separated list of values inclosed in {} that is very nearly correct JSON?

{"line":432,"function":"handleException","ip":"206.211.148.90","http_method":"GET","referrer":"NULL"}

from monolog.

Seldaek avatar Seldaek commented on July 18, 2024

Indeed in 5.4 it will return proper json, but in 5.3 it didn't because of the slightly too greedy stripslashes. Fixed now.

from monolog.

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.