开发者

Logging Framework for iOS? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

开发者_如何学编程

Closed 7 years ago.

Improve this question

Is there a logging framework for iOS that could aid developers in diagnosing app crashes?


You may like:

  • Lumberjack: stable and traditional

"It is similar in concept to other popular logging frameworks such as log4j, yet is designed specifically for Objective-C, and takes advantage of features such as multi-threading, grand central dispatch (if available), lockless atomic operations, and the dynamic nature of the Objective-C runtime."

  • LibComponentLogging: beautiful and hardcore, used by RestKit

"LibComponentLogging is a small logging library for Objective-C applications on Mac OS X and the iPhone OS which provides conditional logging based on log levels and log components. Additionally, different logging strategies can be used, e.g. writing log messages to a file or sending them to the system log, while using the same logging interface."

  • NSLogger: fancy with a dedicated visualization OS X App

"NSLogger is a high perfomance logging utility which displays traces emitted by client applications running on Mac OS X or iOS (iPhone OS). It replaces your usual NSLog()-based traces and provides powerful additions like display filtering, image and binary logging, traces buffering, timing information, etc."


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.


I created a simple logging framework that might help. I'd appreciate any feedback you have. Hope it helps.

Link to Project Page


This previous question seems to overlap. But the bottom line is:

NSLog(@"message");

or:

printf("message");


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. :)


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜