wrap NSLog messages is #ifdef DEBUG

This commit is contained in:
Patrick Wardle
2019-02-10 17:36:36 -10:00
parent 521dd29d5e
commit ae87642e1a
5 changed files with 19 additions and 3 deletions
+1
View File
@@ -61,3 +61,4 @@ fastlane/test_output
iOSInjectionProject/
procInfo.xcodeproj/project.xcworkspace/contents.xcworkspacedata
.DS_Store
BIN
View File
Binary file not shown.
+2 -3
View File
@@ -48,8 +48,7 @@
CD6DE4D4219EA0BD0058094E /* procInfo.h */,
7D6E87761F3BD0FA00D6BD7C /* libprocInfo.a */,
);
name = lib;
path = processMonitor;
path = lib;
sourceTree = "<group>";
};
7D83A9DB1EB6465D001506F0 = {
@@ -73,7 +72,7 @@
7DD0A9241F35A04B000EA15D /* Utilities.m */,
);
name = src;
path = processMonitor;
path = procInfo;
sourceTree = "<group>";
};
/* End PBXGroup section */
+4
View File
@@ -75,9 +75,13 @@
[self pathFromPid];
if(0 == self.path.length)
{
#ifdef DEBUG
//err msg
NSLog(@"ERROR: failed to find path for process %d\n", self.pid);
#endif
//unset
self = nil;
+12
View File
@@ -192,9 +192,13 @@ bail:
auditFile = fopen(AUDIT_PIPE, "r");
if(auditFile == NULL)
{
#ifdef DEBUG
//err msg
NSLog(@"ERROR: failed to open audit pipe %s", AUDIT_PIPE);
#endif
//bail
goto bail;
}
@@ -629,9 +633,13 @@ bail:
process = [[Process alloc] init:processID];
if(nil == process)
{
#ifdef DEBUG
//err msg
NSLog(@"ERROR: failed to create process object for %d/%@", processID, notification.userInfo);
#endif
//bail
goto bail;
}
@@ -696,9 +704,13 @@ bail:
process.binary = [[Binary alloc] init:process.path];
if(nil == process.binary)
{
#ifdef DEBUG
//err msg
NSLog(@"ERROR: failed to create binary object for %d/%@", process.pid, process.path);
#endif
//bail
goto bail;
}