Skip to content

Instantly share code, notes, and snippets.

@onevcat
Created March 6, 2012 14:16
Show Gist options
  • Save onevcat/1986504 to your computer and use it in GitHub Desktop.
Save onevcat/1986504 to your computer and use it in GitHub Desktop.
NSLogger配置
#import "LoggerClient.h"
#ifdef DEBUG
#define LOG_NETWORK(level, ...) {LogMessageF(__FILE__,__LINE__,__FUNCTION__,@"network",level,__VA_ARGS__);LoggerFlush(NULL,YES);}
#define LOG_GENERAL(level, ...) {LogMessageF(__FILE__,__LINE__,__FUNCTION__,@"general",level,__VA_ARGS__);LoggerFlush(NULL,YES);}
#define LOG_GRAPHICS(level, ...) {LogMessageF(__FILE__,__LINE__,__FUNCTION__,@"graphics",level,__VA_ARGS__);LoggerFlush(NULL,YES);}
#define LOG_MEMORY(level, ...) {LogMessageF(__FILE__,__LINE__,__FUNCTION__,@"memory",level,__VA_ARGS__);LoggerFlush(NULL,YES);}
#else
#define LOG_NETWORK(...) do{}while(0)
#define LOG_GENERAL(...) do{}while(0)
#define LOG_GRAPHICS(...) do{}while(0)
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment