Is there a logging framework for iOS that could aid developers in diagnosing app crashes?
相关问题
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
- Get the NSRange for the visible text after scroll
相关文章
- 现在使用swift开发ios应用好还是swift?
- how do I log requests and responses for debugging
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- Swift - hide pickerView after value selected
- How do you detect key up / key down events from a
- didBeginContact:(SKPhysicsContact *)contact not in
This previous question seems to overlap. But the bottom line is:
NSLog(@"message");
or:
printf("message");
You may like:
For basic logging use NSLog(@"your message here") If you want more flexible logging look into Lumberjack. It can let you disable logging in production etc etc.
I have a slightly different need: not only do I want to debug crashes, but I also need to debug other errors (NSError, NSException).
I tried all 3 packages mentioned in IlDan's answer. However, all of them require me to adopt a new way of logging, which may not be compatible with the libraries I depend on. For example, I intended to adopt NSLogger but RestKit, which is an important library in my project, uses LibComponentLogging.
So I ended up with writing a small pod (https://github.com/kennethjiang/Teleport-NSLog) for that. The mechanism is to redirect stderr (where NSLog + all these logging frameworks write messages to) to a backend HTTP server. Now I can debug my app running in user's device just as if it was running in my xcode. :)
I created a simple logging framework that might help. I'd appreciate any feedback you have. Hope it helps.
Link to Project Page
I know this post is old but I'm looking for one as well. I found one called Lumberjack, though I haven't tried it yet.