Set default debug level to error 67/11767/2
authorzheng_wenlong <wenlong_zheng@nexty-ele.com>
Thu, 9 Nov 2017 04:05:19 +0000 (13:05 +0900)
committerZheng Wenlong <wenlong_zheng@nexty-ele.com>
Fri, 10 Nov 2017 00:13:38 +0000 (00:13 +0000)
    Default enable HMI_ERROR output.
    Remove afb-binding.h and add necessary header files.

    [Patch Set 2]
    Change LOG_LEVEL_MAX value equal LOG_LEVEL_DEBUG.

Change-Id: Ie8c4902f13b600c2b3f5c7d2e924bfa3a22dfc52
Signed-off-by: zheng_wenlong <wenlong_zheng@nexty-ele.com>
include/hmi-debug.h
sample/simple-egl/include/hmi-debug.h

index 28aeddf..28705f5 100644 (file)
@@ -19,7 +19,9 @@
 
 #include <time.h>
 #include <stdio.h>
+#include <stdarg.h>
 #include <string.h>
+#include <stdlib.h>
 
 enum LOG_LEVEL{
     LOG_LEVEL_NONE = 0,
@@ -28,7 +30,7 @@ enum LOG_LEVEL{
     LOG_LEVEL_NOTICE,
     LOG_LEVEL_INFO,
     LOG_LEVEL_DEBUG,
-    LOG_LEVEL_MAX = LOG_LEVEL_ERROR
+    LOG_LEVEL_MAX = LOG_LEVEL_DEBUG
 };
 
 #define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
@@ -43,7 +45,7 @@ static char ERROR_FLAG[6][20] = {"NONE", "ERROR", "WARNING", "NOTICE", "INFO", "
 
 static void _HMI_LOG(enum LOG_LEVEL level, const char* file, const char* func, const int line, const char* prefix, const char* log, ...)
 {
-    const int log_level = (getenv("USE_HMI_DEBUG") == NULL)?0:atoi(getenv("USE_HMI_DEBUG"));
+    const int log_level = (getenv("USE_HMI_DEBUG") == NULL)?LOG_LEVEL_ERROR:atoi(getenv("USE_HMI_DEBUG"));
     if(log_level < level)
     {
         return;
index 28aeddf..28705f5 100644 (file)
@@ -19,7 +19,9 @@
 
 #include <time.h>
 #include <stdio.h>
+#include <stdarg.h>
 #include <string.h>
+#include <stdlib.h>
 
 enum LOG_LEVEL{
     LOG_LEVEL_NONE = 0,
@@ -28,7 +30,7 @@ enum LOG_LEVEL{
     LOG_LEVEL_NOTICE,
     LOG_LEVEL_INFO,
     LOG_LEVEL_DEBUG,
-    LOG_LEVEL_MAX = LOG_LEVEL_ERROR
+    LOG_LEVEL_MAX = LOG_LEVEL_DEBUG
 };
 
 #define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
@@ -43,7 +45,7 @@ static char ERROR_FLAG[6][20] = {"NONE", "ERROR", "WARNING", "NOTICE", "INFO", "
 
 static void _HMI_LOG(enum LOG_LEVEL level, const char* file, const char* func, const int line, const char* prefix, const char* log, ...)
 {
-    const int log_level = (getenv("USE_HMI_DEBUG") == NULL)?0:atoi(getenv("USE_HMI_DEBUG"));
+    const int log_level = (getenv("USE_HMI_DEBUG") == NULL)?LOG_LEVEL_ERROR:atoi(getenv("USE_HMI_DEBUG"));
     if(log_level < level)
     {
         return;