0

In my app I am receiving 3 NSLogs below:

AudioStreamBasicDescription:  2 ch,  44100 Hz, 'lpcm' (0x00000C2C) 8.24-bit little-endian signed integer, deinterleaved
2012-06-01 17:05:43.397 App[1579:707] authenticateWithCompletionHandler: enter
2012-06-01 17:05:43.399 App[1579:707] authenticateWithCompletionHandler: exit

However, I do not know where these NSLogs are coming from. Is there any way to find out without going through every single class in my project?

These logs are really bugging me and makes it more difficult to actual see real console output.

Any advice would be appreciated!

Thanks!

SimplyKiwi
  • 12,376
  • 22
  • 105
  • 191

4 Answers4

3

Do a project wide search for NSLog by pressing command + shift + f write NSLog and hit enter

if you cannot find the nslog then they are generated from within the SDK

Omar Abdelhafith
  • 21,163
  • 5
  • 52
  • 56
2

Yes, in Xcode go to the little search bar on left (See the picture), and search for the right keywords.

enter image description here

Note: I'm guessing you imported some Game Center stuff to your project, that's where they're probably coming from

Kaan Dedeoglu
  • 14,765
  • 5
  • 40
  • 41
  • 1
    Yep its coming from this line: [localPlayer authenticateWithCompletionHandler:^(NSError *e) { No NSLogs so it seems to be coming from the OS which is extremely annoying. – SimplyKiwi Jun 01 '12 at 21:19
2

You can try searching for "NSLog(@"authenticateWithCompletionHandler" If that yields no results, then as Omar mentioned, it may be coming from the OS.

scord
  • 1,375
  • 1
  • 17
  • 34
0

You should really write your NSLogs to be more verbose. Provide as much info as you need. One thing that you might consider doing is replacing all of your NSLog statements with a macro (I.E: MYLog) like so:

#define MYLog(msg) NSLog(__FILE__ "(" __LINE__ "): " msg);

Then, just use MYLog as if it were NSLog.

Note: You may have to change this a little as Obj-C uses '@' prefixed strings for NSStrings, and NSLog takes an NSString. I'm not very good with the preprocessor so I don't know how to do this, but I assume that you would use the '##' preprocessor operator.

C0deH4cker
  • 3,959
  • 1
  • 24
  • 35