From: Igor Kotrasinski Date: Fri, 8 Jun 2018 13:28:31 +0000 (+0200) Subject: Use correct enum types in log.h X-Git-Tag: submit/tizen/20180828.110226~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=201c0518c888e54c3a53eff4bce3e91aca3c2916;p=platform%2Fcore%2Fsecurity%2Ftef-simulator.git Use correct enum types in log.h Change-Id: If14013829c7ce55fc53e669b11475e977aef6be3 Signed-off-by: Igor Kotrasinski --- diff --git a/log/log.c b/log/log.c index 24bea03..59b5ce8 100644 --- 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 diff --git a/log/log.h b/log/log.h index 74b1954..15c8148 100644 --- 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)