Search code examples
androidiphoneiosloggingnslog

iOS - making a cross-platform debugging variable macro


I got a macro I am using for debugging/logging, simply:

MY_DEBUG_INFO(msg...)

this works fine on say android:

#ifdef ANDROID
#define MY_DEBUG_INFO(msg...) __android_log(ANDROID_INFO,"TEST",msg...)   (roughly)

However, how do I make the same macro apply to iOS logging? With the new data types and all

#ifdef IOS
#define MY_DEBUG_INFO(msg...) NSLog(????)

Solution

  • #define MY_DEBUG_INFO(...) NSLog(@__VA_ARGS__)