Attention handler trace message refactor

Signed-off-by: austinfcui <austinfcui@gmail.com>
Change-Id: If86af8fb88b0ce15f6a626676a412a5cee88acc0
diff --git a/test/end2end/bp_handler.cpp b/test/end2end/bp_handler.cpp
index 2268036..dd0935d 100644
--- a/test/end2end/bp_handler.cpp
+++ b/test/end2end/bp_handler.cpp
@@ -1,4 +1,4 @@
-#include <attn/attn_logging.hpp>
+#include <util/trace.hpp>
 
 namespace attn
 {
@@ -7,7 +7,7 @@
 void bpHandler()
 {
     // trace message
-    trace<level::INFO>("breakpoint handler");
+    trace::inf("breakpoint handler");
 }
 
 } // namespace attn
diff --git a/test/end2end/logging.cpp b/test/end2end/logging.cpp
index d75625e..6342e27 100644
--- a/test/end2end/logging.cpp
+++ b/test/end2end/logging.cpp
@@ -5,20 +5,6 @@
 namespace attn
 {
 
-/** @brief Log message of type INFO using stdout */
-template <>
-void trace<INFO>(const char* i_message)
-{
-    std::cout << "trace: " << i_message << std::endl;
-}
-
-/** @brief Log message of type ERROR using stdout */
-template <>
-void trace<ERROR>(const char* i_message)
-{
-    std::cout << "error: " << i_message << std::endl;
-}
-
 void eventAttentionFail(int i_error)
 {
     std::cout << "event: attention fail" << i_error << std::endl;
diff --git a/test/end2end/ti_handler.cpp b/test/end2end/ti_handler.cpp
index 021455e..f869c81 100644
--- a/test/end2end/ti_handler.cpp
+++ b/test/end2end/ti_handler.cpp
@@ -1,4 +1,5 @@
-#include <attn/attn_logging.hpp>
+//#include <attn/attn_logging.hpp>
+#include <util/trace.hpp>
 
 namespace attn
 {
@@ -7,7 +8,7 @@
 void tiHandler()
 {
     // trace message
-    trace<level::INFO>("TI handler");
+    trace::inf("TI handler");
 }
 
 } // namespace attn
diff --git a/test/end2end/vital_handler.cpp b/test/end2end/vital_handler.cpp
index 5866d71..342ab69 100644
--- a/test/end2end/vital_handler.cpp
+++ b/test/end2end/vital_handler.cpp
@@ -1,6 +1,6 @@
-#include <attn/attention.hpp>    // for Attention
-#include <attn/attn_common.hpp>  // for RC_SUCCESS
-#include <attn/attn_logging.hpp> // for trace
+#include <attn/attention.hpp>   // for Attention
+#include <attn/attn_common.hpp> // for RC_SUCCESS
+#include <util/trace.hpp>
 
 namespace attn
 {
@@ -11,12 +11,12 @@
     int rc = RC_SUCCESS;
 
     // trace message
-    trace<level::INFO>("Vital handler");
+    trace::inf("Vital handler");
 
     // sanity check
     if (nullptr == i_attention)
     {
-        trace<level::INFO>("attention type is null");
+        trace::inf("attention type is null");
         rc = RC_NOT_HANDLED;
     }