* @return void
*/
-#ifdef _LOGGING
-
-__attribute__((visibility("default")))
-void PrintLog(IN const char *function_name, IN const int32_t line_no,
- IN int32_t module_level, IN int32_t debug_level, IN const char *message,
- ...)
+static void PrintLog(IN const char *function_name, IN const int32_t line_no,
+ IN int32_t module_level, IN int32_t debug_level,
+ IN const char *message, va_list variable_list)
{
#ifndef _ANDROID_NDK
if (0 == (module_level & gmodule_level)
- || 0 == (debug_level & gdebug_level))
+ || 0 == (debug_level & gdebug_level))
return;
#endif
const char *module = GetModuleLevel(module_level);
- va_list variable_list;
- va_start(variable_list, message);
#if defined(__TIZEN__)
char buf[512] = {0,};
vsnprintf(buf, 511, message, variable_list);
vprintf(message, variable_list);
printf("\n");
#endif
- va_end(variable_list);
- return;
}
-#else // ifdef _LOGGING
-
__attribute__((visibility("default")))
-void PrintLog(IN const char *function_name, IN const int32_t line_no,
- IN int32_t module_level, IN int32_t debug_level, IN const char *message,
- ...)
+void PrintSimulatorLog(IN const char *function_name, IN const int32_t line_no,
+ IN int32_t module_level, IN int32_t debug_level,
+ IN const char *message, ...)
{
- // stub function
+#ifdef _LOGGING
+ va_list args;
+ va_start(args, message);
+ PrintLog(function_name, line_no, module_level, debug_level, message,
+ args);
+ va_end(args);
+#endif
}
-
-#endif // ifdef _LOGGING
#endif
#endif // __TIZEN__
-#define _LOG(module_level, debug_level, ...) PrintLog(__FUNCTION__, __LINE__, module_level, debug_level, ##__VA_ARGS__)
+#define _LOG(module_level, debug_level, ...) PrintSimulatorLog(__FUNCTION__, __LINE__, module_level, debug_level, ##__VA_ARGS__)
-#define LOGE(module_level, ...) PrintLog(__FUNCTION__, __LINE__, module_level, ERROR_LEVEL_LOG, ##__VA_ARGS__)
-#define LOGV(module_level, ...) PrintLog(__FUNCTION__, __LINE__, module_level, VERBOSE_LEVEL_LOG, ##__VA_ARGS__)
-#define LOGD(module_level, ...) PrintLog(__FUNCTION__, __LINE__, module_level, DEBUG_LEVEL_LOG, ##__VA_ARGS__)
-#define LOGI(module_level, ...) PrintLog(__FUNCTION__, __LINE__, module_level, SECURED_LEVEL_LOG, ##__VA_ARGS__)
-#define LOGS(module_level, ...) PrintLog(__FUNCTION__, __LINE__, module_level, INFO_LEVEL_LOG, ##__VA_ARGS__)
-#define LOGP(module_level, ...) PrintLog(__FUNCTION__, __LINE__, module_level, PACKET_LEVEL_LOG, ##__VA_ARGS__)
+#define LOGE(module_level, ...) PrintSimulatorLog(__FUNCTION__, __LINE__, module_level, ERROR_LEVEL_LOG, ##__VA_ARGS__)
+#define LOGV(module_level, ...) PrintSimulatorLog(__FUNCTION__, __LINE__, module_level, VERBOSE_LEVEL_LOG, ##__VA_ARGS__)
+#define LOGD(module_level, ...) PrintSimulatorLog(__FUNCTION__, __LINE__, module_level, DEBUG_LEVEL_LOG, ##__VA_ARGS__)
+#define LOGI(module_level, ...) PrintSimulatorLog(__FUNCTION__, __LINE__, module_level, SECURED_LEVEL_LOG, ##__VA_ARGS__)
+#define LOGS(module_level, ...) PrintSimulatorLog(__FUNCTION__, __LINE__, module_level, INFO_LEVEL_LOG, ##__VA_ARGS__)
+#define LOGP(module_level, ...) PrintSimulatorLog(__FUNCTION__, __LINE__, module_level, PACKET_LEVEL_LOG, ##__VA_ARGS__)
#if defined(__cplusplus)
extern "C" {
IN const int32_t debug_level);
/*
- * This method is used to print the debug logs
+ * This method is used to print the simulator debug logs
*
* @param function_name
* [IN] name of the fuction
*
* @return void
*/
-void PrintLog(IN const char* function_name, IN const int32_t line_no,
- IN int32_t module_level, IN int32_t debug_level, IN const char* message,
- ...);
-
+void PrintSimulatorLog(IN const char* function_name, IN const int32_t line_no,
+ IN int32_t module_level, IN int32_t debug_level,
+ IN const char* message, ...);
#if defined(__cplusplus)
} // extern "C"
#endif