Comments (4)
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.
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.
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.
Man, I'd totally forgotten about this. Closing!
from swift-log.
Related Issues (20)
- Crash when using error log / Incomplete LogHandler implementation HOT 2
- Infinite recursion between deprecated API's HOT 4
- MultiplexLogHandler to learn about metadata providers
- Add new Discord Logger to README HOT 2
- Make `StdioOutputStream` public HOT 1
- Supported way of accumulating metadata down the callstack HOT 9
- Logging function autoclosures aren't "rethrows" HOT 8
- Simplify logging `Error` types HOT 4
- Support advanced loghandler metadata use cases HOT 2
- Make StreamLogHandler initializers public
- How should I disclose using Swift Log in my iOS app?
- Unsupported runtime for visionOS HOT 1
- Fails to compile on Fedora 39 with Swift 5.8.1 (From repos) or official 5.9 binaries HOT 7
- PrivacyInfo Manifest HOT 2
- visionOS Compatibility HOT 1
- "Unsupported Runtime" when compiling for xrOS HOT 2
- Adding Error to log functions HOT 2
- CoW (copy-on-write) box the `Logger` components (for perf) HOT 2
- .string and .stringConvertable metadata value equality HOT 7
- Build fails when BUILD_LIBRARY_FOR_DISTRIBUTION is set to YES HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swift-log.