S spilakalb macrumors member Original poster Oct 1, 2012 #1 I found below code for disable/enable NSLog..In which file I place this code for testing..Appdelegate /main/etc....?? Code: #if !defined(DEBUG) || !(TARGET_IPHONE_SIMULATOR) #define NSLog(...) #endif Last edited by a moderator: Oct 1, 2012
I found below code for disable/enable NSLog..In which file I place this code for testing..Appdelegate /main/etc....?? Code: #if !defined(DEBUG) || !(TARGET_IPHONE_SIMULATOR) #define NSLog(...) #endif
jnoxx macrumors 65816 Oct 1, 2012 #2 This should go in your PCH file 🙂 We use something called DLog, which shows you the class + method + line that called the log, really usefull in big apps, and it doesn't include at compile time neither.
This should go in your PCH file 🙂 We use something called DLog, which shows you the class + method + line that called the log, really usefull in big apps, and it doesn't include at compile time neither.
PhoneyDeveloper macrumors 68040 Oct 1, 2012 #3 I use this. It allows you to have NSLog() independent of DebugLog(). It goes in the pch file. Code: #ifdef DEBUG #define DebugLog(s, ...) NSLog(s, ##__VA_ARGS__) #else #define DebugLog(s, ...) #endif
I use this. It allows you to have NSLog() independent of DebugLog(). It goes in the pch file. Code: #ifdef DEBUG #define DebugLog(s, ...) NSLog(s, ##__VA_ARGS__) #else #define DebugLog(s, ...) #endif
F forum user macrumors regular Oct 1, 2012 #4 <slightly off-topic> Came across NSLogger the other day and immediately fell in love with the viewer GUI. Cocoalumberjack was a strong competitor but I could not let go of the filtering possibilities in NSLogger. 😀 Pics: https://github.com/fpillet/NSLogger/raw/master/Screenshots/mainwindow.png </slightly off-topic>
<slightly off-topic> Came across NSLogger the other day and immediately fell in love with the viewer GUI. Cocoalumberjack was a strong competitor but I could not let go of the filtering possibilities in NSLogger. 😀 Pics: https://github.com/fpillet/NSLogger/raw/master/Screenshots/mainwindow.png </slightly off-topic>