Setting up logging in iOS
The JamLog framework lets you send log events to Jam for iOS so that they can be associated with your Jam.
Supported Platforms
iOS 15.0+
Quick Start
Add the following to your Package.swift:
dependencies: [
.package(url: "https://github.com/jamdotdev/jam-ios-log.git", from: "1.0.0")
]Alternatively, you can add the package directly via Xcode.
Usage
import Jam
Jam.debug("Hello world!")Also supports info, warn, and error.
SwiftLog
You can integrate with SwiftLog by importing JamSwiftLog and bootstraping the logging system:
import JamSwiftLog
import Logging
LoggingSystem.bootstrap { label in
JamLogHandler(label: label)
}Alternatively, you can add JamLog to your existing logging system by using the MultiplexLogHandler. Assuming you are already using the StreamLogHandler:
import JamSwiftLog
import Logging
LoggingSystem.bootstrap { label in
MultiplexLogHandler([
StreamLogHandler.standardOutput(label: label),
JamLogHandler(label: label)
])
}React Native
JamLog is also available as a React Native Expo module.
Last updated
Was this helpful?