Giter Club home page Giter Club logo

Comments (8)

ktoso avatar ktoso commented on September 26, 2024 2

This is another case of an issue that is the growing features in the StreamLogHandler in a package that was intended to be an "API only" package 😟 To be honest tend to think it would have been much better if this package never provided any implementation at all I keep thinking (as we did with http://reactive-streams.org)...

I could be convinced that this is small enough to consider "this is small enough", but overall I'm worried we're going down the wrong path growing features here, rather than collaborating on a full blown stream (stdout and/or file) LogHandler, with configuration, output formatting etc. I'm also worried about setting too much precedent about: using "mainly" env as source of logging/config (does not scale to actually configuring many loggers) and naming convention here, though perhaps these are a lesser worry here.

I would love to see us come up and collaborate with a "serious" log handler implementation that would supersede all of the ones that are provided in here. Should we set something like that up and try to collaborate on getting a "real world" nice stream handler as a separate package?

TL;DR; IMHO: This library really should not become the best stream/stdout/file logger. It should be just the bare minimum APIs and be pretty limited such that it is well apparent that using a different "serious" backend is recommended, and we should make such one happen -- who's interested?

from swift-log.

weissi avatar weissi commented on September 26, 2024 1

I'm going to close this because this is an API package. More thoughts here: https://forums.swift.org/t/thoughts-on-why-does-swiftlog-not-have-multiple-log-destinations-formatters-colouring-some-other-feature/37507

from swift-log.

ianpartridge avatar ianpartridge commented on September 26, 2024

No objection from me to the principle of the feature, although I would suggest we make the name a bit less generic to avoid collisions with any other software that might be in the picture - perhaps SWIFT_LOG_LOGLEVEL.

I bet @weissi will be against this though as he wants to keep the default logger super minimal and basic.

from swift-log.

helje5 avatar helje5 commented on September 26, 2024

Just because he doesn't use it! :-) SWIFT_LOG_LOGLEVEL as yet another layer sounds OK, but it should still fallback to LOGLEVEL IMO.

from swift-log.

Yasumoto avatar Yasumoto commented on September 26, 2024

This would be quite handy for on-the-fly tweaking. I get the reasoning for keeping the default implementation simple but think there are enough "best practices" we should encourage that I'd like to see something that encapsulates things like this 🤔

from swift-log.

Yasumoto avatar Yasumoto commented on September 26, 2024

Just this afternoon (I’m very slow after the holidays 😅 ) I came across another Issue where you explained this rationale; and that finally clicked for me. Totally down for separating this as an “API package” vs another “default” one.

I think I’d just love there to be a default robust one! I don’t have cycles to lead the charge (unless no one else does), but happy to contribute!

from swift-log.

weissi avatar weissi commented on September 26, 2024

Sorry for the delay, I agree with @ktoso . I really don't want to encourage users to use the default backend so I'm -1 on the proposed change here. @helje5 why don't you make a new backend that literally starts with a copy & pasted version of the StreamLogHandler?

from swift-log.

helje5 avatar helje5 commented on September 26, 2024

Yeah, I just replaced my own logging implementation with this one, my expectations have been a little wrong I guess :-) I can do my own.

TBH I'd very much prefer if swift-log itself comes with a reasonable default implementation(s). But maybe what's reasonable is too hard to agree on :-)

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.