emorydunn / StreamDeckPlugin

A library for creating Stream Deck plugins in Swift.
https://emorydunn.github.io/StreamDeckPlugin/
MIT License
50 stars 7 forks source link

Look Into SwiftLog #29

Open emorydunn opened 4 months ago

emorydunn commented 4 months ago

The plugin makes heavy use of OSLog for internal logging, which is important, especially for any plugin communication messages. Logging through the StreamDeck app is useful for actual plugins, but the library can't rely on the WebSocket being open. While this is fine for development it's hard for collect logs from users if needed.

Using (SwiftLog)[https://github.com/apple/swift-log] as the logging system could allow for easier user logging. There are a couple of options here.

One would simply be to replace OSLog with SwiftLog without specifying a backend. This would leave any log collection up to the plugin developer, allowing for whatever logging backing they'd like to use. The other option would be to implement a basic file logger (or use an existing library) to provide a default log.