-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logging seems excessive #37
Comments
I like CocoaLumberjack and I could be convinced, but my biggest criticism is that: a) It has to be turned on manually in tests. b) In AppCode the output from test A appears for test B - gets jumbled up. I have another very lightweight logging framework here: https://github.com/jasperblues/OCLogTemplate Supports:
I think I would prefer this one. What do you think? |
I agree CocoaLumberjack might be a bit overkill at the moment. We'd have to implement a new subclass of SenTestCase to enable logging in Your framework should work great. The only thing missing I can think of is the ability to dynamically turn up the logging without a recompile of the library; say to get some logs from a user of a release build. At this juncture that doesn't seem worth the extra complexity to me, especially since, in my limited experience, DI failures occur at init time. |
Ok. . . I could be convinced to go with CocoaLumberjack. . . but if you're convinced that OCLogTemplate is enough, let's run with that. . . On Jul 27, 2013, at 6:23 AM, Robert Gilliam [email protected] wrote:
|
OCLogTemplate it is! |
Fixed in 1a3bdab |
Build seems to be broken. . . how is OCLogTemplate integrated? CocoaPods or sub-module? |
Ah, ok - its a submodule. |
Sorry about that, should have mentioned as much! |
No worries - its all good. . . really great work! |
Thanks! I'm happy that we found a simple solution to this one. |
Robert, how do you turn on Typhoon's logging when you do want to see it? |
What I've been doing is just changing the values in OCLogTemplate.h, which is much simpler than the alternative: If you want to use a preprocessor macro, set that either on the Typhoon static library target or the 'lowest level' cocoapods static library target linked with your target. For example, if you want logging to happen when running OS X Tests (Cocoapods), then you need to define LOGGING_LEVEL_TRACE or any other logging defines in the libPods-OS X Tests (Cocoapods)-Typhoon.a target of the Pods project. |
Consider the output of a single test case, all of which is from the framework and none from the actual test.
Perhaps a logging framework should be introduced? I'm most familiar with CocoaLumberjack myself, which has static, per file log levels.
The text was updated successfully, but these errors were encountered: