diff OrthancServer/OrthancInitialization.cpp @ 108:a6e41de88a53

using glog
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 04 Oct 2012 11:37:56 +0200
parents c35eee0cbd12
children fe180eae201d
line wrap: on
line diff
--- a/OrthancServer/OrthancInitialization.cpp	Thu Oct 04 11:22:20 2012 +0200
+++ b/OrthancServer/OrthancInitialization.cpp	Thu Oct 04 11:37:56 2012 +0200
@@ -27,6 +27,7 @@
 #include <boost/filesystem.hpp>
 #include <curl/curl.h>
 #include <boost/thread.hpp>
+#include <glog/logging.h>
 
 namespace Orthanc
 {
@@ -45,7 +46,7 @@
     if (configurationFile)
     {
       Toolbox::ReadFile(content, configurationFile);
-      printf("Using the configuration from: [%s]\n", configurationFile);
+      LOG(INFO) << "Using the configuration from: " << configurationFile;
     }
     else
     {
@@ -61,18 +62,18 @@
         p /= CONFIGURATION_FILE;
           
         Toolbox::ReadFile(content, p.string());
-        printf("Using the configuration from: [%s]\n", p.string().c_str());
+        LOG(INFO) << "Using the configuration from: " << p.string();
       }
       catch (OrthancException&)
       {
         // No configuration file found, give up with empty configuration
-        printf("Using the default Orthanc configuration\n");
+        LOG(INFO) << "Using the default Orthanc configuration";
         return;
       }
 
 #elif ORTHANC_STANDALONE == 1
       // No default path for the standalone configuration
-      printf("Using the default Orthanc configuration\n");
+      LOG(INFO) << "Using the default Orthanc configuration";
       return;
 
 #else
@@ -84,12 +85,12 @@
         p /= "Resources";
         p /= CONFIGURATION_FILE;
         Toolbox::ReadFile(content, p.string());
-        printf("Using the configuration from: [%s]\n", p.string().c_str());
+        LOG(INFO) << "Using the configuration from: " << p.string();
       }
       catch (OrthancException&)
       {
         // No configuration file found, give up with empty configuration
-        printf("Using the default Orthanc configuration\n");
+        LOG(INFO) << "Using the default Orthanc configuration";
         return;
       }
 #endif