chrisaljoudi / swift-log-oslog Goto Github PK
View Code? Open in Web Editor NEWOSLog (aka Unified Logging) backend for Apple’s SwiftLog
License: Apache License 2.0
OSLog (aka Unified Logging) backend for Apple’s SwiftLog
License: Apache License 2.0
Hi there,
thanks for the great LogHandler impl :-)
I wanted to check-in if you could add a license file.
Libraries without an explicit license are impossible to use in some environments.
Usually Apache v2 works well enough (it's also how most of the SSWG projects including swift-log are licensed ( https://github.com/apple/swift-log/blob/master/LICENSE.txt )). You can add a license quite easily using the helper: https://github.com/chrisaljoudi/swift-log-oslog/community/license/new?branch=master&template=apache-2.0
Ultimately it's your call which license to pick of course though 👍
Thanks in advance!
Hey Chris,
This might fall outside of the scope of this library, but thoughts on implementing a LogHandler backed by Logger, instead of OSLog? Several of the side effects mentioned on swift-log about THIS library can be mitigated in the new API that supports dynamic string interpolation in the log messages.
(Maybe I'm missing a step where I need to tell swift-log
not to swallow them?)
Given the following code:
logger.debug("debug")
logger.info("info")
logger.critical("critical")
logger.error("error")
logger.notice("notice")
logger.trace("trace")
logger.warning("warning")
And a Terminal call to log stream
:
log stream --predicate '(subsystem contains "me.chucker")' --debug
I get:
Filtering the log data using "subsystem CONTAINS "me.chucker""
Timestamp Thread Type Activity PID TTL
2022-11-18 00:19:08.588877+0100 0x147f90 Info 0x0 8955 0 MyApp: [me.chucker.MyApp:] info
2022-11-18 00:19:08.588932+0100 0x147f90 Fault 0x290b3b 8955 0 MyApp: [me.chucker.MyApp:] critical
2022-11-18 00:19:08.588954+0100 0x147f90 Error 0x0 8955 0 MyApp: [me.chucker.MyApp:] error
2022-11-18 00:19:08.588967+0100 0x147f90 Default 0x0 8955 0 MyApp: [me.chucker.MyApp:] notice
2022-11-18 00:19:08.588978+0100 0x147f90 Info 0x0 8955 0 MyApp: [me.chucker.MyApp:] warning
Which is to say… it works as expected for types info and above, but not for debug, even though I explicitly ask log stream
to show debug
messages. Same if I go to the Console app and do Action → Include Debug Messages.
I know the --debug
flag works because ignoring my current app, this:
log stream --predicate 'messageType == "debug"'
…will return nothing, whereas this:
log stream --predicate 'messageType == "debug"' --debug
…will return a veritable firehose (but nothing from my app).
Hi, can we get a new version release? (tag)
We are having some problems with availability but it seems it was fixed on master already!
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.