Use correct enum types in log.h 50/181150/1
authorIgor Kotrasinski <i.kotrasinsk@partner.samsung.com>
Fri, 8 Jun 2018 13:28:31 +0000 (15:28 +0200)
committerIgor Kotrasinski <i.kotrasinsk@partner.samsung.com>
Fri, 8 Jun 2018 13:28:31 +0000 (15:28 +0200)
Change-Id: If14013829c7ce55fc53e669b11475e977aef6be3
Signed-off-by: Igor Kotrasinski <i.kotrasinsk@partner.samsung.com>
log/log.c
log/log.h

index 24bea03..59b5ce8 100644 (file)
--- a/log/log.c
+++ b/log/log.c
@@ -35,7 +35,7 @@
  *  Globals
  *-----------------------------------------------------------------------------*/
 static LogLevel glog_level = SIMU_LOG_DEBUG;
-static int32_t gmodule_level = 0xfffffff;
+static ModuleLevel gmodule_level = MODULE_ALL;
 
 /*-----------------------------------------------------------------------------
  *  Functions
@@ -52,7 +52,7 @@ static int32_t gmodule_level = 0xfffffff;
  * @return  void
  */
 __attribute__((visibility("default")))
-void setDebugAndModuleLevel(const int32_t module_level,
+void setDebugAndModuleLevel(const ModuleLevel module_level,
                            const LogLevel log_level)
 {
        if (module_level < MODULE_UTILS || module_level > MODULE_ALL
@@ -106,7 +106,7 @@ const char *getDebugLevelString(LogLevel dbg_level)
  *
  * @return  const char pointer
  */
-const char *getModuleLevelString(int32_t module_level)
+const char *getModuleLevelString(ModuleLevel module_level)
 {
        switch (module_level) {
        case MODULE_UTILS:
@@ -198,7 +198,7 @@ static android_LogPriority logLevelToAndroidLogLevel(LogLevel log_level)
 #endif
 
 int PrintLog(const char *tag, const char *function_name, const int32_t line_no,
-            int32_t module_level, LogLevel log_level, const char *message,
+            ModuleLevel module_level, LogLevel log_level, const char *message,
             va_list variable_list)
 {
        if (!(module_level & gmodule_level)
@@ -230,7 +230,7 @@ int PrintLog(const char *tag, const char *function_name, const int32_t line_no,
 
 __attribute__((visibility("default")))
 void PrintSimulatorLog(const char *function_name, const int32_t line_no,
-                      int32_t module_level, int32_t log_level,
+                      ModuleLevel module_level, LogLevel log_level,
                       const char *message, ...)
 {
 #ifdef _LOGGING
index 74b1954..15c8148 100644 (file)
--- a/log/log.h
+++ b/log/log.h
@@ -117,7 +117,7 @@ const char* getDebugLevelString(LogLevel dbg_level);
  *
  * @return     const char pointer
  */
-const char* getModuleLevelString(int32_t mdl_level);
+const char* getModuleLevelString(ModuleLevel mdl_level);
 
 /*
  * This method is used to set module level and debug level to debug
@@ -130,7 +130,7 @@ const char* getModuleLevelString(int32_t mdl_level);
  *
  * @return     void
  */
-void setDebugAndModuleLevel(const int32_t module_level,
+void setDebugAndModuleLevel(const ModuleLevel module_level,
                             const LogLevel log_level);
 
 /*
@@ -154,11 +154,11 @@ void setDebugAndModuleLevel(const int32_t module_level,
  * @return     void
  */
 void PrintSimulatorLog(const char* function_name, const int32_t line_no,
-                       int32_t module_level, int32_t log_level,
+                       ModuleLevel module_level, LogLevel log_level,
                        const char* message, ...);
 
 int PrintLog(const char *tag, const char *function_name,
-             const int32_t line_no, int32_t module_level,
+             const int32_t line_no, ModuleLevel module_level,
              LogLevel log_level, const char *message,
              va_list variable_list);
 #if defined(__cplusplus)