首先我一直在閱讀有關CocoaLumberjack一些線程,我一直沒能找到解決這個問題:CocoaLumberjack登錄應用程序崩潰
我使用CocoaLumberjack在我的應用程序日誌。但我想記錄應用程序崩潰。
我已經試過這樣:
void uncaughtExceptionHandler(NSException *exception) {
DDLogError(@"CRASH: %@", exception);
DDLogError(@"Stack Trace: %@", [exception callStackSymbols]);
// Internal error reporting
// Send log to SOA
}
但我在的appDelegate收到此錯誤,在其他地方行之有效:
Use of undeclared identifier '_cmd'; did you mean 'dcmd'
?
有沒有另一種方法來做到這一點?
哇,謝謝你的回覆是對的!現在工作完美,錯誤打印在我的日誌:) –