Trap all errors or exceptions?

41 views
Skip to first unread message

Noah Spitzer-Williams

unread,
Dec 29, 2011, 4:02:27 PM12/29/11
to CocoaLumberjack
How can I hook up CocoaLumberjack to trap all errors or exceptions
thrown by my app? For example, when my app spews out something like
below, I want it saved to the logs automatically:

2011-12-29 12:48:07.046 Project Odessa[94589:1003] +[AppDelegate
stringByAppendingString:]: unrecognized selector sent to class 0x44cac
2011-12-29 12:48:07.047 Project Odessa[94589:1003] +[AppDelegate
stringByAppendingString:]: unrecognized selector sent to class 0x44cac

Thanks!

Robbie Hanson

unread,
Dec 30, 2011, 4:40:19 PM12/30/11
to cocoalu...@googlegroups.com
Great question. There are a couple different ways to setup exception catchers. I don't recall off the top of my head, but the open source exception reporting frameworks should provide useful code bases.

From these, you'll want to issue the desired log statements, followed by [DDLog flushLog].

-Robbie Hanson
Sent from my iPhone

> --
> You received this message because you are subscribed to the Google Groups "CocoaLumberjack" group.
> To post to this group, send email to cocoalu...@googlegroups.com.
> To unsubscribe from this group, send email to cocoalumberja...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/cocoalumberjack?hl=en.
>

Reply all
Reply to author
Forward
0 new messages