Closed daviddelmonte closed 5 years ago
As mentioned in the readme, you can make a delegate that handles logs.
This is what I did to only log errors and faults:
class AppDelegate: UIResponder, UIApplicationDelegate, SMLogDelegate {
func log(_ message: @autoclosure () -> String, type: SMLogType) {}
func info(_ message: @autoclosure () -> String) {}
func debug(_ message: @autoclosure () -> String) {}
func error(_ message: @autoclosure () -> String) {
print("seam error \(message())")
}
func fault(_ message: @autoclosure () -> String) {
print("seam fault \(message())")
}
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
) -> Bool {
SMStore.logger = self
...
}
...
}
Ah. that's great. Thanks
I'm getting a slew of logs, that do not appear to be useful to me. Is there a way to suppress logging, just showing me errors and warnings?
Here's a very small example of the logs...