Add stub PrintLog function 09/159909/4
authorakoszewski <a.koszewski@samsung.com>
Fri, 10 Nov 2017 11:43:23 +0000 (12:43 +0100)
committerTomasz Swierczek <t.swierczek@samsung.com>
Tue, 21 Nov 2017 05:40:00 +0000 (05:40 +0000)
Add stub PrintLog function in release tef-simulator
to fix error with loading debug TA by release tef simulator

Change-Id: Ia673fbb615baaff9834c339ce965baad5317a444

log/log.c
log/log.h

index cfc55c6..afe0f81 100644 (file)
--- a/log/log.c
+++ b/log/log.c
@@ -150,6 +150,9 @@ const char *GetModuleLevel(IN int32_t module_level)
  *
  * @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,
@@ -236,3 +239,15 @@ void PrintLog(IN const char *function_name, IN const int32_t line_no,
        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,
+                         ...)
+{
+       // stub function
+}
+
+#endif // ifdef _LOGGING
index 11b2fd4..8c31f2d 100644 (file)
--- a/log/log.h
+++ b/log/log.h
@@ -102,8 +102,6 @@ typedef enum {
        #endif
 #endif // __TIZEN__
 
-#ifdef _LOGGING
-
 #define _LOG(module_level, debug_level, ...) PrintLog(__FUNCTION__, __LINE__, module_level, debug_level, ##__VA_ARGS__)
 
 #define LOGE(module_level, ...) PrintLog(__FUNCTION__, __LINE__, module_level, ERROR_LEVEL_LOG, ##__VA_ARGS__)
@@ -113,17 +111,6 @@ typedef enum {
 #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__)
 
-#else //ifdef _LOGGING
-
-#define LOGE(module_level, ...)
-#define LOGV(module_level, ...)
-#define LOGD(module_level, ...)
-#define LOGI(module_level, ...)
-#define LOGS(module_level, ...)
-#define LOGP(module_level, ...)
-
-#endif //ifdef _LOGGING
-
 #if defined(__cplusplus)
 extern "C" {
 #endif