Giter Club home page Giter Club logo

Comments (4)

ktoso avatar ktoso commented on September 26, 2024

I absolutely agree but also think that's perhaps one of those things that should be done in a good logging library / "backend implementation" -- and this is just the "API" package. We should not allow this package to keep absorbing more features (arguably it already does too much... which is why things like this come up, since this package did something, but could left a complete void to be filled in), WDYT?

Kind of looking forward to a bells-and-whistles backend to happen, like http://logback.qos.ch/manual/index.html does for http://www.slf4j.org (where apple/swift-log is "like slf4j", "just the API")

from swift-log.

tdotclare avatar tdotclare commented on September 26, 2024

I'd agree that feature sprawl is dangerous but the only real difference between the current Multiplex is that you'd have a version that sorts the handlers it's initialized with in order of increasing priority.

EG, in the example -

  • logging a .critical would skip the first two handlers and just be passed to the third
  • logging an .info would hit the first two and short circuit on the third
  • logging .debug would short-circuit immediately

Note that I'm not saying the package should handle anything about WHERE the errors go (the example handlers would still be implementation-dependant and up to the user to put together) - it simply makes decisions based on the user's configuration that's provided to it. And if anything it seems like it would be less appropriate to shim together something like this into a single handler, since it operates on nothing but info the base system already knows about (and is responsible for defining!)

from swift-log.

weissi avatar weissi commented on September 26, 2024

I'm linking my thoughts of why SwiftLog is so basic here. @tdotclare are you happy closing this as "not for the API package"?

from swift-log.

tdotclare avatar tdotclare commented on September 26, 2024

Man, I'd totally forgotten about this. Closing!

from swift-log.

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.