Output to the XCode 3.0 console - News

  • After the [task launch]; my application diverges the output to the Console
    application only and not longer to the XCode 3.0 console, no matter whether
    running as development or deployment. This never happened on XCode 2.5 (all
    the NSLog went properly to the XCode console only).

      ///////////////////// Here I get all the NSLog on the XCode console
      ///////////////////// and on the Console application too
      NSString    *commandLine = @"ifconfig en0 | grep ether | cut -d' ' -f 2";
      NSArray    *args = [NSArray arrayWithObjects:@"-c",  commandLine, nil];
      NSTask      *task = [[NSTask alloc] init];
      NSPipe      *thePipe = [NSPipe pipe];

      [task setLaunchPath:@"/bin/sh"];
      [task setArguments:args];
      [task setStandardOutput:thePipe];
      [task launch];
      ///////////////////// Now I get the NSLog on the Console application only
      [task waitUntilExit];

    I suppose that the standardOutput of the NSTask shouldn't affect the output
    of my application, but it seems it does.
    I need to get the NSLog on the XCode console only. How can I fix this?
    Is it an XCode's 3.0 bug? Or did I miss something?

    Best Regards
    --
    Lorenzo
    email: <archidea...>
previous month november 2007 next month
MTWTFSS
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    
Go to today