Skip to content

Commit

Permalink
Added *.mode2v3 to .gitignore (more xcode noise), moved debug log to …
Browse files Browse the repository at this point in the history
…Response.h since Response.m is the only place where it's used.
  • Loading branch information
Elfred Pagan committed Dec 20, 2008
1 parent 4761117 commit c3353ec
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -6,6 +6,7 @@ profile
build/*
*.pbxuser
*.mode1v3
*.mode2v3

# old skool
.svn
Expand Down
8 changes: 8 additions & 0 deletions Classes/lib/Response.h
Expand Up @@ -5,6 +5,14 @@
// Created by Ryan Daigle on 7/30/08.
// Copyright 2008 yFactorial, LLC. All rights reserved.
//
#ifdef __OBJC__
//setup debug only logging
#ifdef DEBUG
#define debugLog(...) NSLog(__VA_ARGS__)
#else
#define debugLog(...)
#endif
#endif

@interface Response : NSObject {
NSData *body;
Expand Down
2 changes: 1 addition & 1 deletion Classes/lib/Response.m
Expand Up @@ -30,7 +30,7 @@ - (BOOL)isSuccess {

- (void)log {
if ([self isSuccess]) {
NSLog(@"<= %@", [[[NSString alloc] initWithData:body encoding:NSUTF8StringEncoding] autorelease]);
debugLog(@"<= %@", [[[NSString alloc] initWithData:body encoding:NSUTF8StringEncoding] autorelease]);
}
else {
NSLog(@"<= %@", [[[NSString alloc] initWithData:body encoding:NSUTF8StringEncoding] autorelease]);
Expand Down
6 changes: 0 additions & 6 deletions active_resource_Prefix.pch
Expand Up @@ -3,12 +3,6 @@
//

#ifdef __OBJC__
//setup debug only logging
#ifdef DEBUG
#define debugLog(...) NSLog(__VA_ARGS__)
#else
#define debugLog(...)
#endif
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#endif

0 comments on commit c3353ec

Please sign in to comment.