diff Core/Toolbox.cpp @ 1486:f967bdf8534e

refactoring to Logging.h
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 04 Aug 2015 10:01:31 +0200
parents f176ec4467e6
children 596927722403
line wrap: on
line diff
--- a/Core/Toolbox.cpp	Tue Aug 04 09:35:09 2015 +0200
+++ b/Core/Toolbox.cpp	Tue Aug 04 10:01:31 2015 +0200
@@ -34,6 +34,7 @@
 #include "Toolbox.h"
 
 #include "OrthancException.h"
+#include "Logging.h"
 
 #include <string>
 #include <stdint.h>
@@ -53,10 +54,6 @@
 #include <boost/regex.hpp> 
 #endif
 
-#if HAVE_GOOGLE_LOG == 1
-#include <glog/logging.h>
-#endif
-
 #if defined(_WIN32)
 #include <windows.h>
 #include <process.h>   // For "_spawnvp()"
@@ -1135,10 +1132,7 @@
     if (pid == -1)
     {
       // Error in fork()
-#if HAVE_GOOGLE_LOG == 1
       LOG(ERROR) << "Cannot fork a child process";
-#endif
-
       throw OrthancException(ErrorCode_SystemCommand);
     }
     else if (pid == 0)
@@ -1158,10 +1152,7 @@
 
     if (status != 0)
     {
-#if HAVE_GOOGLE_LOG == 1
       LOG(ERROR) << "System command failed with status code " << status;
-#endif
-
       throw OrthancException(ErrorCode_SystemCommand);
     }
   }