From: Robert Sesek Date: Wed, 27 Feb 2008 22:44:08 +0000 (-0500) Subject: Define a BLU_DEBUG so we can NSLog() the buffer in debug mode but not in release X-Git-Tag: 1.0-b2~1 X-Git-Url: https://src.bluestatic.org/?a=commitdiff_plain;h=7d7dde7e61fe386555e5d7bab653dd47ead95d70;p=printdrop.git Define a BLU_DEBUG so we can NSLog() the buffer in debug mode but not in release * PrintDrop.xcodeproj: Define BLU_DEBUG for the PrintDrop-Debug target * Source/AppController.m: ([AppController readChannel:]): If BLU_DEBUG is defined, NSLog() the buffer --- diff --git a/PrintDrop.xcodeproj/project.pbxproj b/PrintDrop.xcodeproj/project.pbxproj index 1797378..6dde7c4 100644 --- a/PrintDrop.xcodeproj/project.pbxproj +++ b/PrintDrop.xcodeproj/project.pbxproj @@ -476,6 +476,7 @@ INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(HOME)/Applications"; LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/build/Release\""; + OTHER_CFLAGS = "-DBLU_DEBUG"; OTHER_LDFLAGS = ( "-undefined", suppress, diff --git a/Source/AppController.m b/Source/AppController.m index 6943754..4cac97a 100644 --- a/Source/AppController.m +++ b/Source/AppController.m @@ -77,6 +77,9 @@ memset(&buf, '\0', sizeof(buf)); sleep(1); numbytes = libssh2_channel_read(channel, buf, sizeof(buf)); +#ifdef BLU_DEBUG + NSLog(@"buf: %s", buf); +#endif } while (numbytes > 0); }