diff UnitTestsSources/UnitTestsMain.cpp @ 1485:27661b33f624

Creation of Logging.h
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 04 Aug 2015 09:35:09 +0200
parents f3672356c121
children 9f66a12eb8fc
line wrap: on
line diff
--- a/UnitTestsSources/UnitTestsMain.cpp	Sun Aug 02 15:57:45 2015 +0200
+++ b/UnitTestsSources/UnitTestsMain.cpp	Tue Aug 04 09:35:09 2015 +0200
@@ -40,6 +40,7 @@
 #include "../Core/Compression/ZlibCompressor.h"
 #include "../Core/DicomFormat/DicomTag.h"
 #include "../Core/HttpServer/HttpToolbox.h"
+#include "../Core/Logging.h"
 #include "../Core/OrthancException.h"
 #include "../Core/Toolbox.h"
 #include "../Core/Uuid.h"
@@ -488,8 +489,6 @@
 }
 
 
-#include <glog/logging.h>
-
 TEST(Logger, Basic)
 {
   LOG(INFO) << "I say hello";
@@ -821,22 +820,17 @@
 
 int main(int argc, char **argv)
 {
-  // Initialize Google's logging library.
-  FLAGS_logtostderr = true;
-  FLAGS_minloglevel = 0;
-
-  // Go to trace-level verbosity
-  //FLAGS_v = 1;
+  Logging::Initialize();
+  Logging::EnableInfoLevel(true);
+  Toolbox::DetectEndianness();
+  Toolbox::MakeDirectory("UnitTestsResults");
+  OrthancInitialize();
 
-  Toolbox::DetectEndianness();
-
-  google::InitGoogleLogging("Orthanc");
-
-  Toolbox::MakeDirectory("UnitTestsResults");
-
-  OrthancInitialize();
   ::testing::InitGoogleTest(&argc, argv);
   int result = RUN_ALL_TESTS();
+
   OrthancFinalize();
+  Logging::Finalize();
+
   return result;
 }