Coder Social home page Coder Social logo

Add Success level about monolog HOT 2 CLOSED

seldaek avatar seldaek commented on August 18, 2024
Add Success level

from monolog.

Comments (2)

Seldaek avatar Seldaek commented on August 18, 2024

Generally logs are there to look at when things went wrong, that's why the main focus is always on errors. Typically normal operation stuff like success can just be logged at the INFO level. I don't think adding a level is gonna help, there are already too many I would say and since they're sequential you would at best add one between INFO and NOTICE, which would not be much use I think.

Another strategy is to create two loggers with different handlers, one that you use to log specific success messages and the other for errors. Then you can route the messages differently.

from monolog.

intval avatar intval commented on August 18, 2024

Probably You are right, as my intention was to use monolog for collecting statistics about certain events, rather than just logging them.

As I've learnt from you, statsd would be a better solution for stats collecting and machine analyzing,
while logs are actually meant for human reading.

My implementation would be adding another, custom, handler for monolog, that will capture the log stuff and send it to stats aggregating system based on some context data that I'll pass along with the 'log' message itself.

Thanks.

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.