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/CaffePreprocessor.cpp b/tests/CaffePreprocessor.cpp
index 7dd6e69..6adc75d 100644
--- a/tests/CaffePreprocessor.cpp
+++ b/tests/CaffePreprocessor.cpp
@@ -6,7 +6,6 @@
 #include "CaffePreprocessor.hpp"
 
 #include <boost/numeric/conversion/cast.hpp>
-#include <boost/log/trivial.hpp>
 #include <boost/assert.hpp>
 #include <boost/format.hpp>
 
diff --git a/tests/Cifar10Database.cpp b/tests/Cifar10Database.cpp
index 6ba5085..b0a9059 100644
--- a/tests/Cifar10Database.cpp
+++ b/tests/Cifar10Database.cpp
@@ -4,8 +4,9 @@
 //
 #include "Cifar10Database.hpp"
 
+#include <armnn/Logging.hpp>
+
 #include <boost/numeric/conversion/cast.hpp>
-#include <boost/log/trivial.hpp>
 #include <fstream>
 #include <vector>
 
@@ -25,7 +26,7 @@
     std::ifstream fileStream(fullpath, std::ios::binary);
     if (!fileStream.is_open())
     {
-        BOOST_LOG_TRIVIAL(fatal) << "Failed to load " << fullpath;
+        ARMNN_LOG(fatal) << "Failed to load " << fullpath;
         return nullptr;
     }
 
@@ -34,7 +35,7 @@
 
     if (!fileStream.good())
     {
-        BOOST_LOG_TRIVIAL(fatal) << "Failed to read " << fullpath;
+        ARMNN_LOG(fatal) << "Failed to read " << fullpath;
         return nullptr;
     }
 
diff --git a/tests/DeepSpeechV1Database.hpp b/tests/DeepSpeechV1Database.hpp
index 182f373..a690e3f 100644
--- a/tests/DeepSpeechV1Database.hpp
+++ b/tests/DeepSpeechV1Database.hpp
@@ -12,7 +12,6 @@
 
 #include <armnn/TypesUtils.hpp>
 
-#include <boost/log/trivial.hpp>
 #include <boost/numeric/conversion/cast.hpp>
 
 #include <array>
@@ -39,7 +38,7 @@
         }
         catch (const std::exception& e)
         {
-            BOOST_LOG_TRIVIAL(error) << "An error occurred when splitting tokens: " << e.what();
+            ARMNN_LOG(error) << "An error occurred when splitting tokens: " << e.what();
             continue;
         }
         for (const std::string& token : tokens)
@@ -52,7 +51,7 @@
                 }
                 catch (const std::exception&)
                 {
-                    BOOST_LOG_TRIVIAL(error) << "'" << token << "' is not a valid number. It has been ignored.";
+                    ARMNN_LOG(error) << "'" << token << "' is not a valid number. It has been ignored.";
                 }
             }
         }
@@ -163,7 +162,7 @@
     }
     catch (const InferenceTestImageException& e)
     {
-        BOOST_LOG_TRIVIAL(fatal) << "Failed to load image for test case " << testCaseId << ". Error: " << e.what();
+        ARMNN_LOG(fatal) << "Failed to load image for test case " << testCaseId << ". Error: " << e.what();
         return nullptr;
     }
 
@@ -188,7 +187,7 @@
     }
     catch (const InferenceTestImageException& e)
     {
-        BOOST_LOG_TRIVIAL(fatal) << "Failed to load image for test case " << testCaseId << ". Error: " << e.what();
+        ARMNN_LOG(fatal) << "Failed to load image for test case " << testCaseId << ". Error: " << e.what();
         return nullptr;
     }
 
diff --git a/tests/DeepSpeechV1InferenceTest.hpp b/tests/DeepSpeechV1InferenceTest.hpp
index 3195d2b..c46fa57 100644
--- a/tests/DeepSpeechV1InferenceTest.hpp
+++ b/tests/DeepSpeechV1InferenceTest.hpp
@@ -8,7 +8,6 @@
 #include "DeepSpeechV1Database.hpp"
 
 #include <boost/assert.hpp>
-#include <boost/log/trivial.hpp>
 #include <boost/numeric/conversion/cast.hpp>
 #include <boost/test/tools/floating_point_comparison.hpp>
 
@@ -51,7 +50,7 @@
         {
             if(!m_FloatComparer(output1[j], m_ExpectedOutputs.m_InputSeq[j]))
             {
-                BOOST_LOG_TRIVIAL(error) << "InputSeq for Lstm " << this->GetTestCaseId() <<
+                ARMNN_LOG(error) << "InputSeq for Lstm " << this->GetTestCaseId() <<
                                          " is incorrect at" << j;
                 return TestCaseResult::Failed;
             }
@@ -61,7 +60,7 @@
         {
             if(!m_FloatComparer(output2[j], m_ExpectedOutputs.m_StateH[j]))
             {
-                BOOST_LOG_TRIVIAL(error) << "StateH for Lstm " << this->GetTestCaseId() <<
+                ARMNN_LOG(error) << "StateH for Lstm " << this->GetTestCaseId() <<
                                          " is incorrect";
                 return TestCaseResult::Failed;
             }
@@ -71,7 +70,7 @@
         {
             if(!m_FloatComparer(output3[j], m_ExpectedOutputs.m_StateC[j]))
             {
-                BOOST_LOG_TRIVIAL(error) << "StateC for Lstm " << this->GetTestCaseId() <<
+                ARMNN_LOG(error) << "StateC for Lstm " << this->GetTestCaseId() <<
                                          " is incorrect";
                 return TestCaseResult::Failed;
             }
diff --git a/tests/ExecuteNetwork/ExecuteNetwork.cpp b/tests/ExecuteNetwork/ExecuteNetwork.cpp
index 16e1fd3..55864c8 100644
--- a/tests/ExecuteNetwork/ExecuteNetwork.cpp
+++ b/tests/ExecuteNetwork/ExecuteNetwork.cpp
@@ -15,7 +15,6 @@
     armnn::LogSeverity level = armnn::LogSeverity::Debug;
 #endif
     armnn::ConfigureLogging(true, true, level);
-    armnnUtils::ConfigureLogging(boost::log::core::get().get(), true, true, level);
 
     std::string testCasesFile;
 
@@ -120,7 +119,7 @@
         // and that desc.add_options() can throw boost::io::too_few_args.
         // They really won't in any of these cases.
         BOOST_ASSERT_MSG(false, "Caught unexpected exception");
-        BOOST_LOG_TRIVIAL(fatal) << "Fatal internal error: " << e.what();
+        ARMNN_LOG(fatal) << "Fatal internal error: " << e.what();
         return EXIT_FAILURE;
     }
 
@@ -166,7 +165,7 @@
         // Check that the file exists.
         if (!boost::filesystem::exists(testCasesFile))
         {
-            BOOST_LOG_TRIVIAL(fatal) << "Given file \"" << testCasesFile << "\" does not exist";
+            ARMNN_LOG(fatal) << "Given file \"" << testCasesFile << "\" does not exist";
             return EXIT_FAILURE;
         }
 
@@ -177,7 +176,7 @@
         // Check that there is at least one test case to run
         if (testCases.empty())
         {
-            BOOST_LOG_TRIVIAL(fatal) << "Given file \"" << testCasesFile << "\" has no test cases";
+            ARMNN_LOG(fatal) << "Given file \"" << testCasesFile << "\" has no test cases";
             return EXIT_FAILURE;
         }
 
diff --git a/tests/ImageTensorGenerator/ImageTensorGenerator.cpp b/tests/ImageTensorGenerator/ImageTensorGenerator.cpp
index 5bd8532..4e8fe78 100644
--- a/tests/ImageTensorGenerator/ImageTensorGenerator.cpp
+++ b/tests/ImageTensorGenerator/ImageTensorGenerator.cpp
@@ -5,12 +5,12 @@
 
 #include "ImageTensorGenerator.hpp"
 #include "../InferenceTestImage.hpp"
+#include <armnn/Logging.hpp>
 #include <armnn/TypesUtils.hpp>
 
 #include <boost/filesystem.hpp>
 #include <boost/filesystem/operations.hpp>
 #include <boost/filesystem/path.hpp>
-#include <boost/log/trivial.hpp>
 #include <boost/program_options.hpp>
 #include <boost/variant.hpp>
 
@@ -285,7 +285,7 @@
     }
     catch (const InferenceTestImageException& e)
     {
-        BOOST_LOG_TRIVIAL(fatal) << "Failed to load image file " << imagePath << " with error: " << e.what();
+        ARMNN_LOG(fatal) << "Failed to load image file " << imagePath << " with error: " << e.what();
         return -1;
     }
 
@@ -297,7 +297,7 @@
                              imageDataContainers[0]);
         if (!imageTensorFile)
         {
-            BOOST_LOG_TRIVIAL(fatal) << "Failed to write to output file" << outputPath;
+            ARMNN_LOG(fatal) << "Failed to write to output file" << outputPath;
             imageTensorFile.close();
             return -1;
         }
@@ -305,7 +305,7 @@
     }
     else
     {
-        BOOST_LOG_TRIVIAL(fatal) << "Failed to open output file" << outputPath;
+        ARMNN_LOG(fatal) << "Failed to open output file" << outputPath;
         return -1;
     }
 
diff --git a/tests/InferenceModel.hpp b/tests/InferenceModel.hpp
index 6ec63ba..50b1607 100644
--- a/tests/InferenceModel.hpp
+++ b/tests/InferenceModel.hpp
@@ -24,7 +24,6 @@
 #include <boost/algorithm/string/join.hpp>
 #include <boost/exception/exception.hpp>
 #include <boost/exception/diagnostic_information.hpp>
-#include <boost/log/trivial.hpp>
 #include <boost/format.hpp>
 #include <boost/program_options.hpp>
 #include <boost/filesystem.hpp>
diff --git a/tests/InferenceTest.cpp b/tests/InferenceTest.cpp
index cf97459..c6e5011 100644
--- a/tests/InferenceTest.cpp
+++ b/tests/InferenceTest.cpp
@@ -7,7 +7,6 @@
 #include "../src/armnn/Profiling.hpp"
 #include <boost/algorithm/string.hpp>
 #include <boost/numeric/conversion/cast.hpp>
-#include <boost/log/trivial.hpp>
 #include <boost/filesystem/path.hpp>
 #include <boost/assert.hpp>
 #include <boost/format.hpp>
@@ -125,7 +124,7 @@
 #if !defined (NDEBUG)
     if (params.m_IterationCount > 0) // If just running a few select images then don't bother to warn.
     {
-        BOOST_LOG_TRIVIAL(warning) << "Performance test running in DEBUG build - results may be inaccurate.";
+        ARMNN_LOG(warning) << "Performance test running in DEBUG build - results may be inaccurate.";
     }
 #endif
 
@@ -141,7 +140,7 @@
         inferenceTimesFile.open(params.m_InferenceTimesFile.c_str(), ios_base::trunc | ios_base::out);
         if (!inferenceTimesFile.good())
         {
-            BOOST_LOG_TRIVIAL(error) << "Failed to open inference times file for writing: "
+            ARMNN_LOG(error) << "Failed to open inference times file for writing: "
                 << params.m_InferenceTimesFile;
             return false;
         }
@@ -158,7 +157,7 @@
     std::unique_ptr<IInferenceTestCase> warmupTestCase = testCaseProvider.GetTestCase(0);
     if (warmupTestCase == nullptr)
     {
-        BOOST_LOG_TRIVIAL(error) << "Failed to load test case";
+        ARMNN_LOG(error) << "Failed to load test case";
         return false;
     }
 
@@ -168,7 +167,7 @@
     }
     catch (const TestFrameworkException& testError)
     {
-        BOOST_LOG_TRIVIAL(error) << testError.what();
+        ARMNN_LOG(error) << testError.what();
         return false;
     }
 
@@ -182,7 +181,7 @@
 
         if (testCase == nullptr)
         {
-            BOOST_LOG_TRIVIAL(error) << "Failed to load test case";
+            ARMNN_LOG(error) << "Failed to load test case";
             return false;
         }
 
@@ -214,7 +213,7 @@
         }
         catch (const TestFrameworkException& testError)
         {
-            BOOST_LOG_TRIVIAL(error) << testError.what();
+            ARMNN_LOG(error) << testError.what();
             result = TestCaseResult::Abort;
         }
 
@@ -236,9 +235,9 @@
 
     const double averageTimePerTestCaseMs = totalTime / nbProcessed * 1000.0f;
 
-    BOOST_LOG_TRIVIAL(info) << std::fixed << std::setprecision(3) <<
+    ARMNN_LOG(info) << std::fixed << std::setprecision(3) <<
         "Total time for " << nbProcessed << " test cases: " << totalTime << " seconds";
-    BOOST_LOG_TRIVIAL(info) << std::fixed << std::setprecision(3) <<
+    ARMNN_LOG(info) << std::fixed << std::setprecision(3) <<
         "Average time per test case: " << averageTimePerTestCaseMs << " ms";
 
     // if profiling is enabled print out the results
@@ -249,7 +248,7 @@
 
     if (!success)
     {
-        BOOST_LOG_TRIVIAL(error) << "One or more test cases failed";
+        ARMNN_LOG(error) << "One or more test cases failed";
         return false;
     }
 
diff --git a/tests/InferenceTest.hpp b/tests/InferenceTest.hpp
index f2b8c63..7b7dcec 100644
--- a/tests/InferenceTest.hpp
+++ b/tests/InferenceTest.hpp
@@ -5,12 +5,11 @@
 #pragma once
 
 #include <armnn/ArmNN.hpp>
+#include <armnn/Logging.hpp>
 #include <armnn/TypesUtils.hpp>
 #include "InferenceModel.hpp"
 
-#include <Logging.hpp>
 
-#include <boost/log/core/core.hpp>
 #include <boost/program_options.hpp>
 
 
diff --git a/tests/InferenceTest.inl b/tests/InferenceTest.inl
index c91193f..fd888e2 100644
--- a/tests/InferenceTest.inl
+++ b/tests/InferenceTest.inl
@@ -6,7 +6,6 @@
 
 #include <boost/algorithm/string.hpp>
 #include <boost/numeric/conversion/cast.hpp>
-#include <boost/log/trivial.hpp>
 #include <boost/filesystem/path.hpp>
 #include <boost/assert.hpp>
 #include <boost/format.hpp>
@@ -121,11 +120,11 @@
     ClassifierResultProcessor resultProcessor(m_QuantizationParams.first, m_QuantizationParams.second);
     boost::apply_visitor(resultProcessor, output);
 
-    BOOST_LOG_TRIVIAL(info) << "= Prediction values for test #" << testCaseId;
+    ARMNN_LOG(info) << "= Prediction values for test #" << testCaseId;
     auto it = resultProcessor.GetResultMap().rbegin();
     for (int i=0; i<5 && it != resultProcessor.GetResultMap().rend(); ++i)
     {
-        BOOST_LOG_TRIVIAL(info) << "Top(" << (i+1) << ") prediction is " << it->second <<
+        ARMNN_LOG(info) << "Top(" << (i+1) << ") prediction is " << it->second <<
           " with value: " << (it->first);
         ++it;
     }
@@ -141,7 +140,7 @@
     // If we're just running the defaultTestCaseIds, each one must be classified correctly.
     if (params.m_IterationCount == 0 && prediction != m_Label)
     {
-        BOOST_LOG_TRIVIAL(error) << "Prediction for test case " << testCaseId << " (" << prediction << ")" <<
+        ARMNN_LOG(error) << "Prediction for test case " << testCaseId << " (" << prediction << ")" <<
             " is incorrect (should be " << m_Label << ")";
         return TestCaseResult::Failed;
     }
@@ -149,7 +148,7 @@
     // If a validation file was provided as input, it checks that the prediction matches.
     if (!m_ValidationPredictions.empty() && prediction != m_ValidationPredictions[testCaseId])
     {
-        BOOST_LOG_TRIVIAL(error) << "Prediction for test case " << testCaseId << " (" << prediction << ")" <<
+        ARMNN_LOG(error) << "Prediction for test case " << testCaseId << " (" << prediction << ")" <<
             " doesn't match the prediction in the validation file (" << m_ValidationPredictions[testCaseId] << ")";
         return TestCaseResult::Failed;
     }
@@ -250,7 +249,7 @@
 {
     const double accuracy = boost::numeric_cast<double>(m_NumCorrectInferences) /
         boost::numeric_cast<double>(m_NumInferences);
-    BOOST_LOG_TRIVIAL(info) << std::fixed << std::setprecision(3) << "Overall accuracy: " << accuracy;
+    ARMNN_LOG(info) << std::fixed << std::setprecision(3) << "Overall accuracy: " << accuracy;
 
     // If a validation file was requested as output, the predictions are saved to it.
     if (!m_ValidationFileOut.empty())
@@ -265,7 +264,7 @@
         }
         else
         {
-            BOOST_LOG_TRIVIAL(error) << "Failed to open output validation file: " << m_ValidationFileOut;
+            ARMNN_LOG(error) << "Failed to open output validation file: " << m_ValidationFileOut;
             return false;
         }
     }
@@ -310,7 +309,6 @@
     armnn::LogSeverity level = armnn::LogSeverity::Debug;
 #endif
     armnn::ConfigureLogging(true, true, level);
-    armnnUtils::ConfigureLogging(boost::log::core::get().get(), true, true, level);
 
     try
     {
@@ -331,7 +329,7 @@
     }
     catch (armnn::Exception const& e)
     {
-        BOOST_LOG_TRIVIAL(fatal) << "Armnn Error: " << e.what();
+        ARMNN_LOG(fatal) << "Armnn Error: " << e.what();
         return 1;
     }
 }
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;
     }
 
diff --git a/tests/MobileNetSsdDatabase.hpp b/tests/MobileNetSsdDatabase.hpp
index 1a99ed7..1921831 100644
--- a/tests/MobileNetSsdDatabase.hpp
+++ b/tests/MobileNetSsdDatabase.hpp
@@ -12,7 +12,6 @@
 
 #include <armnn/TypesUtils.hpp>
 
-#include <boost/log/trivial.hpp>
 #include <boost/numeric/conversion/cast.hpp>
 
 #include <array>
@@ -100,7 +99,7 @@
     }
     catch (const InferenceTestImageException& e)
     {
-        BOOST_LOG_TRIVIAL(fatal) << "Failed to load image for test case " << testCaseId << ". Error: " << e.what();
+        ARMNN_LOG(fatal) << "Failed to load image for test case " << testCaseId << ". Error: " << e.what();
         return nullptr;
     }
 
diff --git a/tests/MobileNetSsdInferenceTest.hpp b/tests/MobileNetSsdInferenceTest.hpp
index 7beedf8..a950b93 100644
--- a/tests/MobileNetSsdInferenceTest.hpp
+++ b/tests/MobileNetSsdInferenceTest.hpp
@@ -8,7 +8,6 @@
 #include "MobileNetSsdDatabase.hpp"
 
 #include <boost/assert.hpp>
-#include <boost/log/trivial.hpp>
 #include <boost/numeric/conversion/cast.hpp>
 #include <boost/test/tools/floating_point_comparison.hpp>
 
@@ -52,7 +51,7 @@
         const size_t expectedNumDetections = m_DetectedObjects.size();
         if (numDetections != expectedNumDetections)
         {
-            BOOST_LOG_TRIVIAL(error) << "Number of detections is incorrect: Expected (" <<
+            ARMNN_LOG(error) << "Number of detections is incorrect: Expected (" <<
                 expectedNumDetections << ")" << " but got (" << numDetections << ")";
             return TestCaseResult::Failed;
         }
@@ -85,7 +84,7 @@
         {
             if (it == detectedObjects.end())
             {
-                BOOST_LOG_TRIVIAL(error) << "No more detected objects found! Index out of bounds: " << i;
+                ARMNN_LOG(error) << "No more detected objects found! Index out of bounds: " << i;
                 return TestCaseResult::Abort;
             }
 
@@ -94,7 +93,7 @@
 
             if (detectedObject.m_Class != expectedObject.m_Class)
             {
-                BOOST_LOG_TRIVIAL(error) << "Prediction for test case " << this->GetTestCaseId() <<
+                ARMNN_LOG(error) << "Prediction for test case " << this->GetTestCaseId() <<
                     " is incorrect: Expected (" << expectedObject.m_Class << ")" <<
                     " but predicted (" << detectedObject.m_Class << ")";
                 return TestCaseResult::Failed;
@@ -102,7 +101,7 @@
 
             if(!m_FloatComparer(detectedObject.m_Confidence, expectedObject.m_Confidence))
             {
-                BOOST_LOG_TRIVIAL(error) << "Confidence of prediction for test case " << this->GetTestCaseId() <<
+                ARMNN_LOG(error) << "Confidence of prediction for test case " << this->GetTestCaseId() <<
                     " is incorrect: Expected (" << expectedObject.m_Confidence << ")  +- 1.0 pc" <<
                     " but predicted (" << detectedObject.m_Confidence << ")";
                 return TestCaseResult::Failed;
@@ -113,7 +112,7 @@
                 !m_FloatComparer(detectedObject.m_BoundingBox.m_XMax, expectedObject.m_BoundingBox.m_XMax) ||
                 !m_FloatComparer(detectedObject.m_BoundingBox.m_YMax, expectedObject.m_BoundingBox.m_YMax))
             {
-                BOOST_LOG_TRIVIAL(error) << "Detected bounding box for test case " << this->GetTestCaseId() <<
+                ARMNN_LOG(error) << "Detected bounding box for test case " << this->GetTestCaseId() <<
                     " is incorrect";
                 return TestCaseResult::Failed;
             }
diff --git a/tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp b/tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp
index ee8e8e4..0d7d768 100644
--- a/tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp
+++ b/tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp
@@ -53,7 +53,6 @@
         using namespace boost::filesystem;
         armnn::LogSeverity level = armnn::LogSeverity::Debug;
         armnn::ConfigureLogging(true, true, level);
-        armnnUtils::ConfigureLogging(boost::log::core::get().get(), true, true, level);
 
         // Set-up program Options
         namespace po = boost::program_options;
@@ -138,8 +137,8 @@
         std::string invalidBackends;
         if (!CheckRequestedBackendsAreValid(computeDevice, armnn::Optional<std::string&>(invalidBackends)))
         {
-            BOOST_LOG_TRIVIAL(fatal) << "The list of preferred devices contains invalid backend IDs: "
-                                     << invalidBackends;
+            ARMNN_LOG(fatal) << "The list of preferred devices contains invalid backend IDs: "
+                             << invalidBackends;
             return EXIT_FAILURE;
         }
         armnn::Status status;
@@ -166,7 +165,7 @@
         {
             std::stringstream message;
             message << "armnn::Exception (" << e.what() << ") caught from optimize.";
-            BOOST_LOG_TRIVIAL(fatal) << message.str();
+            ARMNN_LOG(fatal) << message.str();
             return 1;
         }
 
@@ -175,7 +174,7 @@
         status = runtime->LoadNetwork(networkId, std::move(optimizedNet));
         if (status == armnn::Status::Failure)
         {
-            BOOST_LOG_TRIVIAL(fatal) << "armnn::IRuntime: Failed to load network";
+            ARMNN_LOG(fatal) << "armnn::IRuntime: Failed to load network";
             return 1;
         }
 
@@ -200,7 +199,7 @@
         if (modelOutputLabelsPath.empty() || !boost::filesystem::exists(modelOutputLabelsPath) ||
             !boost::filesystem::is_regular_file(modelOutputLabelsPath))
         {
-            BOOST_LOG_TRIVIAL(fatal) << "Invalid model output labels path at " << modelOutputLabelsPath;
+            ARMNN_LOG(fatal) << "Invalid model output labels path at " << modelOutputLabelsPath;
         }
         const std::vector<armnnUtils::LabelCategoryNames> modelOutputLabels =
             LoadModelOutputLabels(modelOutputLabelsPath);
@@ -211,7 +210,7 @@
         size_t imageEndIndex;
         if (imageIndexStrs.size() != 2)
         {
-            BOOST_LOG_TRIVIAL(fatal) << "Invalid validation range specification: Invalid format " << validationRange;
+            ARMNN_LOG(fatal) << "Invalid validation range specification: Invalid format " << validationRange;
             return 1;
         }
         try
@@ -221,7 +220,7 @@
         }
         catch (const std::exception& e)
         {
-            BOOST_LOG_TRIVIAL(fatal) << "Invalid validation range specification: " << validationRange;
+            ARMNN_LOG(fatal) << "Invalid validation range specification: " << validationRange;
             return 1;
         }
 
@@ -229,7 +228,7 @@
         if (!blacklistPath.empty() &&
             !(boost::filesystem::exists(blacklistPath) && boost::filesystem::is_regular_file(blacklistPath)))
         {
-            BOOST_LOG_TRIVIAL(fatal) << "Invalid path to blacklist file at " << blacklistPath;
+            ARMNN_LOG(fatal) << "Invalid path to blacklist file at " << blacklistPath;
             return 1;
         }
 
@@ -265,7 +264,7 @@
             }
             else
             {
-                BOOST_LOG_TRIVIAL(fatal) << "Invalid Data layout: " << inputLayout;
+                ARMNN_LOG(fatal) << "Invalid Data layout: " << inputLayout;
                 return 1;
             }
             const unsigned int inputTensorWidth =
@@ -277,7 +276,7 @@
             // Check output tensor shape is valid
             if (modelOutputLabels.size() != outputNumElements)
             {
-                BOOST_LOG_TRIVIAL(fatal) << "Number of output elements: " << outputNumElements
+                ARMNN_LOG(fatal) << "Number of output elements: " << outputNumElements
                                          << " , mismatches the number of output labels: " << modelOutputLabels.size();
                 return 1;
             }
@@ -299,7 +298,7 @@
             }
             else
             {
-                BOOST_LOG_TRIVIAL(fatal) << "Unsupported frontend: " << modelFormat;
+                ARMNN_LOG(fatal) << "Unsupported frontend: " << modelFormat;
                 return 1;
             }
             const NormalizationParameters& normParams = GetNormalizationParameters(modelFrontend, inputTensorDataType);
@@ -350,7 +349,7 @@
 
                 if (status == armnn::Status::Failure)
                 {
-                    BOOST_LOG_TRIVIAL(fatal) << "armnn::IRuntime: Failed to enqueue workload for image: " << imageName;
+                    ARMNN_LOG(fatal) << "armnn::IRuntime: Failed to enqueue workload for image: " << imageName;
                 }
 
                 checker.AddImageResult<TContainer>(imageName, outputDataContainers);
@@ -366,7 +365,7 @@
             std::cout << "Top " << i <<  " Accuracy: " << checker.GetAccuracy(i) << "%" << "\n";
         }
 
-        BOOST_LOG_TRIVIAL(info) << "Accuracy Tool ran successfully!";
+        ARMNN_LOG(info) << "Accuracy Tool ran successfully!";
         return 0;
     }
     catch (armnn::Exception const & e)
diff --git a/tests/MultipleNetworksCifar10/MultipleNetworksCifar10.cpp b/tests/MultipleNetworksCifar10/MultipleNetworksCifar10.cpp
index fec78ac..4d45f5d 100644
--- a/tests/MultipleNetworksCifar10/MultipleNetworksCifar10.cpp
+++ b/tests/MultipleNetworksCifar10/MultipleNetworksCifar10.cpp
@@ -6,7 +6,6 @@
 #include <chrono>
 #include <vector>
 #include <array>
-#include <boost/log/trivial.hpp>
 
 #include "armnn/ArmNN.hpp"
 #include "armnn/Utils.hpp"
@@ -32,8 +31,6 @@
     {
         // Configures logging for both the ARMNN library and this test program.
         armnn::ConfigureLogging(true, true, level);
-        armnnUtils::ConfigureLogging(boost::log::core::get().get(), true, true, level);
-
         namespace po = boost::program_options;
 
         std::vector<armnn::BackendId> computeDevice;
@@ -98,8 +95,8 @@
         std::string invalidBackends;
         if (!CheckRequestedBackendsAreValid(computeDevice, armnn::Optional<std::string&>(invalidBackends)))
         {
-            BOOST_LOG_TRIVIAL(fatal) << "The list of preferred devices contains invalid backend IDs: "
-                                     << invalidBackends;
+            ARMNN_LOG(fatal) << "The list of preferred devices contains invalid backend IDs: "
+                             << invalidBackends;
             return EXIT_FAILURE;
         }
 
@@ -143,7 +140,7 @@
             {
                 std::stringstream message;
                 message << "armnn::Exception ("<<e.what()<<") caught from optimize.";
-                BOOST_LOG_TRIVIAL(fatal) << message.str();
+                ARMNN_LOG(fatal) << message.str();
                 return 1;
             }
 
@@ -152,7 +149,7 @@
             status = runtime->LoadNetwork(networkId, std::move(optimizedNet));
             if (status == armnn::Status::Failure)
             {
-                BOOST_LOG_TRIVIAL(fatal) << "armnn::IRuntime: Failed to load network";
+                ARMNN_LOG(fatal) << "armnn::IRuntime: Failed to load network";
                 return 1;
             }
 
@@ -195,7 +192,7 @@
                     armnnUtils::MakeOutputTensors(outputBindings, outputDataContainers));
                 if (status == armnn::Status::Failure)
                 {
-                    BOOST_LOG_TRIVIAL(fatal) << "armnn::IRuntime: Failed to enqueue workload";
+                    ARMNN_LOG(fatal) << "armnn::IRuntime: Failed to enqueue workload";
                     return 1;
                 }
             }
@@ -209,13 +206,13 @@
 
                 if (!std::equal(output0.begin(), output0.end(), outputK.begin(), outputK.end()))
                 {
-                    BOOST_LOG_TRIVIAL(error) << "Multiple networks inference failed!";
+                    ARMNN_LOG(error) << "Multiple networks inference failed!";
                     return 1;
                 }
             }
         }
 
-        BOOST_LOG_TRIVIAL(info) << "Multiple networks inference ran successfully!";
+        ARMNN_LOG(info) << "Multiple networks inference ran successfully!";
         return 0;
     }
     catch (armnn::Exception const& e)
diff --git a/tests/NetworkExecutionUtils/NetworkExecutionUtils.hpp b/tests/NetworkExecutionUtils/NetworkExecutionUtils.hpp
index cbdc327..279bf30 100644
--- a/tests/NetworkExecutionUtils/NetworkExecutionUtils.hpp
+++ b/tests/NetworkExecutionUtils/NetworkExecutionUtils.hpp
@@ -23,7 +23,6 @@
 #include "CsvReader.hpp"
 #include "../InferenceTest.hpp"
 
-#include <Logging.hpp>
 #include <Profiling.hpp>
 #include <ResolveType.hpp>
 
@@ -62,7 +61,7 @@
         }
         catch (const std::exception& e)
         {
-            BOOST_LOG_TRIVIAL(error) << "An error occurred when splitting tokens: " << e.what();
+            ARMNN_LOG(error) << "An error occurred when splitting tokens: " << e.what();
             continue;
         }
         for (const std::string& token : tokens)
@@ -75,7 +74,7 @@
                 }
                 catch (const std::exception&)
                 {
-                    BOOST_LOG_TRIVIAL(error) << "'" << token << "' is not a valid number. It has been ignored.";
+                    ARMNN_LOG(error) << "'" << token << "' is not a valid number. It has been ignored.";
                 }
             }
         }
@@ -264,7 +263,7 @@
             }
             else
             {
-                BOOST_LOG_TRIVIAL(info) << "Output Tensor File: " << m_OutputTensorFile << " could not be opened!";
+                ARMNN_LOG(info) << "Output Tensor File: " << m_OutputTensorFile << " could not be opened!";
             }
             outputTensorFile.close();
         }
@@ -335,7 +334,7 @@
     else
     {
         std::string errorMessage = "Unsupported tensor data type " + dataTypeStr;
-        BOOST_LOG_TRIVIAL(fatal) << errorMessage;
+        ARMNN_LOG(fatal) << errorMessage;
 
         inputTensorFile.close();
         throw armnn::Exception(errorMessage);
@@ -465,7 +464,7 @@
             }
             else
             {
-                BOOST_LOG_TRIVIAL(fatal) << "Unsupported tensor data type \"" << params.m_OutputTypes[i] << "\". ";
+                ARMNN_LOG(fatal) << "Unsupported tensor data type \"" << params.m_OutputTypes[i] << "\". ";
                 return EXIT_FAILURE;
             }
         }
@@ -475,7 +474,7 @@
 
         if (params.m_GenerateTensorData)
         {
-            BOOST_LOG_TRIVIAL(warning) << "The input data was generated, note that the output will not be useful";
+            ARMNN_LOG(warning) << "The input data was generated, note that the output will not be useful";
         }
 
         // Print output tensors
@@ -489,28 +488,28 @@
             boost::apply_visitor(printer, outputDataContainers[i]);
         }
 
-        BOOST_LOG_TRIVIAL(info) << "\nInference time: " << std::setprecision(2)
+        ARMNN_LOG(info) << "\nInference time: " << std::setprecision(2)
                                 << std::fixed << inference_duration.count() << " ms";
 
         // If thresholdTime == 0.0 (default), then it hasn't been supplied at command line
         if (params.m_ThresholdTime != 0.0)
         {
-            BOOST_LOG_TRIVIAL(info) << "Threshold time: " << std::setprecision(2)
+            ARMNN_LOG(info) << "Threshold time: " << std::setprecision(2)
                                     << std::fixed << params.m_ThresholdTime << " ms";
             auto thresholdMinusInference = params.m_ThresholdTime - inference_duration.count();
-            BOOST_LOG_TRIVIAL(info) << "Threshold time - Inference time: " << std::setprecision(2)
+            ARMNN_LOG(info) << "Threshold time - Inference time: " << std::setprecision(2)
                                     << std::fixed << thresholdMinusInference << " ms" << "\n";
 
             if (thresholdMinusInference < 0)
             {
-                BOOST_LOG_TRIVIAL(fatal) << "Elapsed inference time is greater than provided threshold time.\n";
+                ARMNN_LOG(fatal) << "Elapsed inference time is greater than provided threshold time.\n";
                 return EXIT_FAILURE;
             }
         }
     }
     catch (armnn::Exception const& e)
     {
-        BOOST_LOG_TRIVIAL(fatal) << "Armnn Error: " << e.what();
+        ARMNN_LOG(fatal) << "Armnn Error: " << e.what();
         return EXIT_FAILURE;
     }
 
@@ -562,27 +561,27 @@
     }
     else
     {
-        BOOST_LOG_TRIVIAL(fatal) << "Unknown model format: '" << modelFormat << "'. Please include 'binary' or 'text'";
+        ARMNN_LOG(fatal) << "Unknown model format: '" << modelFormat << "'. Please include 'binary' or 'text'";
         return EXIT_FAILURE;
     }
 
     if ((inputTensorShapesVector.size() != 0) && (inputTensorShapesVector.size() != inputNamesVector.size()))
     {
-        BOOST_LOG_TRIVIAL(fatal) << "input-name and input-tensor-shape must have the same amount of elements.";
+        ARMNN_LOG(fatal) << "input-name and input-tensor-shape must have the same amount of elements.";
         return EXIT_FAILURE;
     }
 
     if ((inputTensorDataFilePathsVector.size() != 0) &&
         (inputTensorDataFilePathsVector.size() != inputNamesVector.size()))
     {
-        BOOST_LOG_TRIVIAL(fatal) << "input-name and input-tensor-data must have the same amount of elements.";
+        ARMNN_LOG(fatal) << "input-name and input-tensor-data must have the same amount of elements.";
         return EXIT_FAILURE;
     }
 
     if ((outputTensorFilesVector.size() != 0) &&
         (outputTensorFilesVector.size() != outputNamesVector.size()))
     {
-        BOOST_LOG_TRIVIAL(fatal) << "output-name and write-outputs-to-file must have the same amount of elements.";
+        ARMNN_LOG(fatal) << "output-name and write-outputs-to-file must have the same amount of elements.";
         return EXIT_FAILURE;
     }
 
@@ -593,7 +592,7 @@
     }
     else if ((inputTypesVector.size() != 0) && (inputTypesVector.size() != inputNamesVector.size()))
     {
-        BOOST_LOG_TRIVIAL(fatal) << "input-name and input-type must have the same amount of elements.";
+        ARMNN_LOG(fatal) << "input-name and input-type must have the same amount of elements.";
         return EXIT_FAILURE;
     }
 
@@ -604,7 +603,7 @@
     }
     else if ((outputTypesVector.size() != 0) && (outputTypesVector.size() != outputNamesVector.size()))
     {
-        BOOST_LOG_TRIVIAL(fatal) << "output-name and output-type must have the same amount of elements.";
+        ARMNN_LOG(fatal) << "output-name and output-type must have the same amount of elements.";
         return EXIT_FAILURE;
     }
 
@@ -627,7 +626,7 @@
             }
             catch (const armnn::InvalidArgumentException& e)
             {
-                BOOST_LOG_TRIVIAL(fatal) << "Cannot create tensor shape: " << e.what();
+                ARMNN_LOG(fatal) << "Cannot create tensor shape: " << e.what();
                 return EXIT_FAILURE;
             }
         }
@@ -636,7 +635,7 @@
     // Check that threshold time is not less than zero
     if (thresholdTime < 0)
     {
-        BOOST_LOG_TRIVIAL(fatal) << "Threshold time supplied as a command line argument is less than zero.";
+        ARMNN_LOG(fatal) << "Threshold time supplied as a command line argument is less than zero.";
         return EXIT_FAILURE;
     }
 
@@ -665,7 +664,7 @@
     // Warn if ExecuteNetwork will generate dummy input data
     if (params.m_GenerateTensorData)
     {
-        BOOST_LOG_TRIVIAL(warning) << "No input files provided, input tensors will be filled with 0s.";
+        ARMNN_LOG(warning) << "No input files provided, input tensors will be filled with 0s.";
     }
 
     // Forward to implementation based on the parser type
@@ -674,7 +673,7 @@
 #if defined(ARMNN_SERIALIZER)
     return MainImpl<armnnDeserializer::IDeserializer, float>(params, runtime);
 #else
-    BOOST_LOG_TRIVIAL(fatal) << "Not built with serialization support.";
+        ARMNN_LOG(fatal) << "Not built with serialization support.";
     return EXIT_FAILURE;
 #endif
     }
@@ -683,7 +682,7 @@
 #if defined(ARMNN_CAFFE_PARSER)
         return MainImpl<armnnCaffeParser::ICaffeParser, float>(params, runtime);
 #else
-        BOOST_LOG_TRIVIAL(fatal) << "Not built with Caffe parser support.";
+        ARMNN_LOG(fatal) << "Not built with Caffe parser support.";
         return EXIT_FAILURE;
 #endif
     }
@@ -692,7 +691,7 @@
 #if defined(ARMNN_ONNX_PARSER)
     return MainImpl<armnnOnnxParser::IOnnxParser, float>(params, runtime);
 #else
-    BOOST_LOG_TRIVIAL(fatal) << "Not built with Onnx parser support.";
+        ARMNN_LOG(fatal) << "Not built with Onnx parser support.";
     return EXIT_FAILURE;
 #endif
     }
@@ -701,7 +700,7 @@
 #if defined(ARMNN_TF_PARSER)
         return MainImpl<armnnTfParser::ITfParser, float>(params, runtime);
 #else
-        BOOST_LOG_TRIVIAL(fatal) << "Not built with Tensorflow parser support.";
+        ARMNN_LOG(fatal) << "Not built with Tensorflow parser support.";
         return EXIT_FAILURE;
 #endif
     }
@@ -710,20 +709,20 @@
 #if defined(ARMNN_TF_LITE_PARSER)
         if (! isModelBinary)
         {
-            BOOST_LOG_TRIVIAL(fatal) << "Unknown model format: '" << modelFormat << "'. Only 'binary' format supported \
+            ARMNN_LOG(fatal) << "Unknown model format: '" << modelFormat << "'. Only 'binary' format supported \
               for tflite files";
             return EXIT_FAILURE;
         }
         return MainImpl<armnnTfLiteParser::ITfLiteParser, float>(params, runtime);
 #else
-        BOOST_LOG_TRIVIAL(fatal) << "Unknown model format: '" << modelFormat <<
+        ARMNN_LOG(fatal) << "Unknown model format: '" << modelFormat <<
             "'. Please include 'caffe', 'tensorflow', 'tflite' or 'onnx'";
         return EXIT_FAILURE;
 #endif
     }
     else
     {
-        BOOST_LOG_TRIVIAL(fatal) << "Unknown model format: '" << modelFormat <<
+        ARMNN_LOG(fatal) << "Unknown model format: '" << modelFormat <<
                                  "'. Please include 'caffe', 'tensorflow', 'tflite' or 'onnx'";
         return EXIT_FAILURE;
     }
@@ -797,7 +796,7 @@
         // and that desc.add_options() can throw boost::io::too_few_args.
         // They really won't in any of these cases.
         BOOST_ASSERT_MSG(false, "Caught unexpected exception");
-        BOOST_LOG_TRIVIAL(fatal) << "Fatal internal error: " << e.what();
+        ARMNN_LOG(fatal) << "Fatal internal error: " << e.what();
         return EXIT_FAILURE;
     }
 
@@ -837,7 +836,7 @@
     std::string invalidBackends;
     if (!CheckRequestedBackendsAreValid(computeDevices, armnn::Optional<std::string&>(invalidBackends)))
     {
-        BOOST_LOG_TRIVIAL(fatal) << "The list of preferred devices contains invalid backend IDs: "
+        ARMNN_LOG(fatal) << "The list of preferred devices contains invalid backend IDs: "
                                  << invalidBackends;
         return EXIT_FAILURE;
     }
diff --git a/tests/YoloDatabase.cpp b/tests/YoloDatabase.cpp
index 472fc80..98db8d4 100644
--- a/tests/YoloDatabase.cpp
+++ b/tests/YoloDatabase.cpp
@@ -5,6 +5,7 @@
 #include "YoloDatabase.hpp"
 
 #include <armnn/Exceptions.hpp>
+#include <armnn/Logging.hpp>
 
 #include <array>
 #include <cstdint>
@@ -13,7 +14,6 @@
 
 #include <boost/assert.hpp>
 #include <boost/format.hpp>
-#include <boost/log/trivial.hpp>
 #include <boost/numeric/conversion/cast.hpp>
 
 #include "InferenceTestImage.hpp"
@@ -91,7 +91,7 @@
     }
     catch (const InferenceTestImageException& e)
     {
-        BOOST_LOG_TRIVIAL(fatal) << "Failed to load test case " << testCaseId << " with error: " << e.what();
+        ARMNN_LOG(fatal) << "Failed to load test case " << testCaseId << " with error: " << e.what();
         return nullptr;
     }
 
diff --git a/tests/YoloInferenceTest.hpp b/tests/YoloInferenceTest.hpp
index eb6b227..91ea977 100644
--- a/tests/YoloInferenceTest.hpp
+++ b/tests/YoloInferenceTest.hpp
@@ -145,7 +145,7 @@
             const YoloDetectedObject& detectedObject = *outputIt;
             if (detectedObject.m_Class != expectedDetection.m_Class)
             {
-                BOOST_LOG_TRIVIAL(error) << "Prediction for test case " << this->GetTestCaseId() <<
+                ARMNN_LOG(error) << "Prediction for test case " << this->GetTestCaseId() <<
                     " is incorrect: Expected (" << expectedDetection.m_Class << ")" <<
                     " but predicted (" << detectedObject.m_Class << ")";
                 return TestCaseResult::Failed;
@@ -157,7 +157,7 @@
                 !m_FloatComparer(detectedObject.m_Box.m_H, expectedDetection.m_Box.m_H) ||
                 !m_FloatComparer(detectedObject.m_Confidence, expectedDetection.m_Confidence))
             {
-                BOOST_LOG_TRIVIAL(error) << "Detected bounding box for test case " << this->GetTestCaseId() <<
+                ARMNN_LOG(error) << "Detected bounding box for test case " << this->GetTestCaseId() <<
                     " is incorrect";
                 return TestCaseResult::Failed;
             }