Add PDBG callback function for logging with log level
Signed-off-by: austinfcui <austinfcui@gmail.com>
Change-Id: I8cac38dec0d2f48ef20d89c95e77f73079fd31d6
diff --git a/main_nl.cpp b/main_nl.cpp
index 227c6a6..d5a501f 100644
--- a/main_nl.cpp
+++ b/main_nl.cpp
@@ -8,6 +8,7 @@
#include <attn/attn_main.hpp>
#include <buildinfo.hpp>
#include <cli.hpp>
+#include <util/pdbg_callback.hpp>
/**
* @brief Attention handler application main()
@@ -37,6 +38,9 @@
}
else
{
+ // set PDBG log callback function.
+ pdbg_set_logfunc(util::pdbg_log_callback);
+
// Pdbg targets should only be initialized once according to
// libpdbg documentation. Initializing them here will make sure
// they are initialized for the attention handler, invocation of