Support to use lg2 logging

Change-Id: I3a11433fa6bbbad165a65037b9253eda7206f946
diff --git a/.gitignore b/.gitignore
index 8d2357a..296dc9b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
 /build
 /subprojects/googletest
 /subprojects/libhei
+/subprojects/phosphor-logging
diff --git a/meson.build b/meson.build
index 555c482..6ebf954 100644
--- a/meson.build
+++ b/meson.build
@@ -56,6 +56,9 @@
 # default to the subproject.
 libhei_dep = dependency('hei', fallback : ['libhei', 'libhei_dep'])
 
+phosphor_logging_dep = dependency('phosphor-logging',
+    fallback: ['phosphor-logging', 'phosphor_logging_dep'])
+
 sdbusplus_dep       = dependency('sdbusplus', version : '>=1.0')
 dbus_interfaces_dep = dependency('phosphor-dbus-interfaces')
 
diff --git a/util/meson.build b/util/meson.build
index f562559..b832ba4 100644
--- a/util/meson.build
+++ b/util/meson.build
@@ -13,6 +13,7 @@
 util_deps = [
     libhei_dep,
     libpdbg_dep,
+    phosphor_logging_dep,
 ]
 
 if get_option('phal').enabled()
diff --git a/util/trace.hpp b/util/trace.hpp
index ef940fd..ccafd98 100644
--- a/util/trace.hpp
+++ b/util/trace.hpp
@@ -3,6 +3,8 @@
 #include <inttypes.h>
 #include <stdio.h>
 
+#include <phosphor-logging/lg2.hpp>
+
 #include <cstdarg>
 
 #ifndef TEST_TRACE