Logging
If you want to extend or reduce your logs or override the console logs path with your own destination, it's easy to do so with just a few lines of code.
Log level
You can easily change your log depth just by setting the logLevel property of the SetappManager class to one of the standard options:
.verbose.debug.info(default log level).warning.error.off
SetappManager.logLevel = .debugLogging override
To override the Setapp’s log destination with your own logger, use the setLogHandle method of the SetappManager class. This function takes a closure that accepts the message string and the SetappLogLevel parameter.
SetappManager.setLogHandle { (message: String, logLevel: SetappLogLevel) in
print("[\(logLevel)]", message)
}Viewing logs in Console
To display the Framework logs in the Console app, follow these steps:
-
Open the app and paste the following query into the Search field:
subsystem:com.setapp.fmwk -
Make sure these items have been selected in the Actions menu:
- Include Info Messages
- Include Debug Messages
Alternatively, you can allow showing debug & info messages from the Setapp Framework by executing this command in Terminal:
sudo log config --subsystem com.setapp.fmwk --mode "level:debug"
Updated 8 months ago
