1234567891011121314151617181920212223242526272829303132333435363738 |
- #ifndef __LOG_H_
- #define __LOG_H_
- #if defined PLATFORM_MS5700
- #define LOG_TO_LSAPI //printf log by LSAPI_Log_Debug
- #elif defined PLATFORM_U9507C || defined PLATFORM_EC20
- #define LOG_TO_WIN //printf log by printf function
- #endif
- #if defined LOG_TO_WIN
- #define ON_SHOW_INFO(info) printf("%s",info)
- #elif defined LOG_TO_LSAPI
- #include "lsapi_sys.h"
- #define ON_SHOW_INFO(info) LSAPI_Log_Debug(info)
- #else
- #error "You need to make a choise for log LOG_TYPE"
- #endif
- #ifndef NULL
- #define NULL 0
- #endif
- void wjlprintf(const char *level,const char *format,...);
- #if 0
- #define wlog_info(...) LSAPI_Log_Debug(__VA_ARGS__)
- #define wlog_warn(...) LSAPI_Log_Debug(__VA_ARGS__)
- #define wlog_error(...) LSAPI_Log_Debug(__VA_ARGS__)
- #else//处理完snprintf的错误后可使用以下
- #define wlog_info(...) wjlprintf("info",__VA_ARGS__)
- #define wlog_warn(...) wjlprintf("warn",__VA_ARGS__)
- #define wlog_error(...) wjlprintf("erro",__VA_ARGS__)
- #define wlog_debug(...)
- #endif
- void setLogRoute(char typeUsb, char typeOutter);
- #endif
|