Azure IoT common library
Dependents: STM32F746_iothub_client_sample_mqtt f767zi_mqtt iothub_client_sample_amqp iothub_client_sample_http ... more
Diff: xlogging.c
- Revision:
- 8:3db46d1e5471
- Parent:
- 7:1af47e3a19b6
- Child:
- 16:18e7ebd42bb2
diff -r 1af47e3a19b6 -r 3db46d1e5471 xlogging.c --- a/xlogging.c Fri Jul 29 16:01:07 2016 -0700 +++ b/xlogging.c Fri Aug 12 10:04:46 2016 -0700 @@ -9,13 +9,8 @@ #ifdef WINCE #include <stdarg.h> -#if defined _MSC_VER -#define FUNC_NAME __FUNCDNAME__ -#else -#define FUNC_NAME __func__ -#endif -void consolelogger_log(LOG_CATEGORY log_category, unsigned int options, const char* format, ...) +void consolelogger_log(LOG_CATEGORY log_category, const char* file, const char* func, const int line, unsigned int options, const char* format, ...) { va_list args; va_start(args, format); @@ -28,7 +23,7 @@ (void)printf("Info: "); break; case LOG_ERROR: - (void)printf("Error: Time:%.24s File:%s Func:%s Line:%d ", ctime(&t), __FILE__, FUNC_NAME, __LINE__); + (void)printf("Error: Time:%.24s File:%s Func:%s Line:%d ", ctime(&t), file, func, line); break; default: break;