Fix wrong time comparison 24/319224/2
authorHwankyu Jhun <h.jhun@samsung.com>
Fri, 18 Oct 2024 00:24:02 +0000 (09:24 +0900)
committerHwanKyu Jhun <h.jhun@samsung.com>
Fri, 18 Oct 2024 00:23:28 +0000 (00:23 +0000)
The priority and if condition are changed.

Change-Id: Ie0af348969caea81c7bf39079e1291bba52096e7
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/rpc-port/tracer-internal.cc

index 852e92ba91f686016c1dc72f88637bcb73c89514..aef5ea5e0e9fd92e10f977fcca99ed491a39e6d3 100644 (file)
@@ -26,14 +26,14 @@ namespace {
 
 log_priority GetLogPriority(double elpased_time) {
   log_priority priority;
-  if (elpased_time >= 1.0f)
+  if (elpased_time < 1.0f)
+    priority = DLOG_DEBUG;
+  else if (elpased_time < 5.0f)
     priority = DLOG_INFO;
-  else if (elpased_time >= 5.0f)
+  else if (elpased_time < 10.0f)
     priority = DLOG_WARN;
-  else if (elpased_time >= 10.0f)
-    priority = DLOG_ERROR;
   else
-    priority = DLOG_DEBUG;
+    priority = DLOG_ERROR;
   return priority;
 }