开发者

Best Method for Organizing NSLog Statements for Large Project

I am curious what other people are doing for organizing NSLog statements in large project. I have worked with more complex logging frameworks for Java, Flex, etc... that allow for some methods of doing this, but I haven't seen anything for logging within an iOS / OS X application.

For ex开发者_StackOverflow社区ample, there are specific 'logging levels' within log4j that allow you to assign log messages to groups (for example: informational logs, warning logs, error logs, etc...). This is helpful because you can determine what level actually gets output to the console. If you only need to see the error logs, you aren't bombarded with a bunch of extra log statements.

Is there any built-in mechanism for this, or are there any third party frameworks that do this? (I want to be clear here - this isn't the only thing I am looking for. I would be very interested in hearing how people handle this issue and others related to logging on a larger Objective-C project).


Apple has its own C logging facility called asl (Apple System Log) which seems to do some of what you want. I also managed to find one currently maintained Objective-C logging framework called CocoaLumberjack, however, I have never used it myself.


I use a header file I found at http://brenwill.com/2010/flexible-ios-logging/

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜