S spilakalb macrumors member Original poster Sep 23, 2012 40 0 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 Dec 29, 2010 1,343 0 Aartselaar // Antwerp // Belgium 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 Sep 2, 2008 3,114 93 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 Aug 28, 2008 204 2 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>