Nextrek
@ 52
Nextrek / iOS / StoryBoard / StoryBoard / Utils / Logger.h
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
// // Logger.h // // Copyright 2012. All rights reserved. // // Version 1.0 // /** Logger levels */ #define APP_LOGGER_LEVEL_OFF 0 #define APP_LOGGER_LEVEL_FATAL 1 #define APP_LOGGER_LEVEL_ERROR 2 #define APP_LOGGER_LEVEL_WARN 3 #define APP_LOGGER_LEVEL_INFO 4 #define APP_LOGGER_LEVEL_DEBUG 5 #define APP_LOGGER_LEVEL_ALL 6 #import "AppConfig.h" #if APP_LOGGER_LEVEL != APP_LOGGER_LEVEL_OFF #define __LOG(type, message) NSLog(@"[%s] %s @ %d => %@", type, __PRETTY_FUNCTION__, __LINE__, message); #if APP_LOGGER_LEVEL >= APP_LOGGER_LEVEL_DEBUG #define LOG_DEBUG(message) __LOG("DEBUG", message); #endif #if APP_LOGGER_LEVEL >= APP_LOGGER_LEVEL_INFO #define LOG_INFO(message) __LOG("INFO", message); #define LOG_INFO_X(message, ...) NSLog(@"[%s] %s @ %d => %@", "INFO", __PRETTY_FUNCTION__, __LINE__, [NSString stringWithFormat:message,__VA_ARGS__]); #define LOG_INFO_METHOD() __LOG("INFO", @"method call"); #endif #if APP_LOGGER_LEVEL >= APP_LOGGER_LEVEL_WARN #define LOG_WARN(message) __LOG("WARN", message); #endif #if APP_LOGGER_LEVEL >= APP_LOGGER_LEVEL_ERROR #define LOG_ERROR(message) __LOG("ERROR", message); #define LOG_ERROR_X(message, ...) NSLog(@"[%s] %s @ %d => %@", "ERROR", __PRETTY_FUNCTION__, __LINE__, [NSString stringWithFormat:message,__VA_ARGS__]); #endif #if APP_LOGGER_LEVEL >= APP_LOGGER_LEVEL_FATAL #define LOG_FATAL(message) __LOG("FATAL", message); #endif #endif /** Dummy macros for disabled log */ #ifndef LOG_DEBUG #define LOG_DEBUG(message) #endif #ifndef LOG_INFO #define LOG_INFO(message) #define LOG_INFO_X(message, ...) #define LOG_INFO_METHOD() #endif #ifndef LOG_WARN #define LOG_WARN(message) #endif #ifndef LOG_ERROR #define LOG_ERROR(message) #define LOG_ERROR_X(message, ...) #endif #ifndef LOG_FATAL #define LOG_FATAL(message) #endif |
Commits for Nextrek/iOS/StoryBoard/StoryBoard/Utils/Logger.h
Revision | Author | Commited | Message |
---|---|---|---|
52 | FAquili | Tue 10 Dec, 2013 21:18:24 +0000 | 1.0 Storyboards |