Replace boost logging with simple logger
!referencetests:214319
* Reduces arm nn binary size ~15%
* Also fixed test logging black hole issues
Change-Id: Iba27db304d9a8088fa46aeb0b52225d93bb56bc8
Signed-off-by: Derek Lamberti <derek.lamberti@arm.com>
diff --git a/tests/MnistDatabase.cpp b/tests/MnistDatabase.cpp
index d2fe164..bd5029f 100644
--- a/tests/MnistDatabase.cpp
+++ b/tests/MnistDatabase.cpp
@@ -4,8 +4,9 @@
//
#include "MnistDatabase.hpp"
+#include <armnn/Logging.hpp>
+
#include <boost/numeric/conversion/cast.hpp>
-#include <boost/log/trivial.hpp>
#include <boost/assert.hpp>
#include <fstream>
#include <vector>
@@ -36,12 +37,12 @@
if (!imageStream.is_open())
{
- BOOST_LOG_TRIVIAL(fatal) << "Failed to load " << imagePath;
+ ARMNN_LOG(fatal) << "Failed to load " << imagePath;
return nullptr;
}
if (!labelStream.is_open())
{
- BOOST_LOG_TRIVIAL(fatal) << "Failed to load " << imagePath;
+ ARMNN_LOG(fatal) << "Failed to load " << imagePath;
return nullptr;
}
@@ -51,13 +52,13 @@
imageStream.read(reinterpret_cast<char*>(&magic), sizeof(magic));
if (magic != 0x03080000)
{
- BOOST_LOG_TRIVIAL(fatal) << "Failed to read " << imagePath;
+ ARMNN_LOG(fatal) << "Failed to read " << imagePath;
return nullptr;
}
labelStream.read(reinterpret_cast<char*>(&magic), sizeof(magic));
if (magic != 0x01080000)
{
- BOOST_LOG_TRIVIAL(fatal) << "Failed to read " << labelPath;
+ ARMNN_LOG(fatal) << "Failed to read " << labelPath;
return nullptr;
}
@@ -79,12 +80,12 @@
if (!imageStream.good())
{
- BOOST_LOG_TRIVIAL(fatal) << "Failed to read " << imagePath;
+ ARMNN_LOG(fatal) << "Failed to read " << imagePath;
return nullptr;
}
if (!labelStream.good())
{
- BOOST_LOG_TRIVIAL(fatal) << "Failed to read " << labelPath;
+ ARMNN_LOG(fatal) << "Failed to read " << labelPath;
return nullptr;
}