changeset 1491:e460341872dc

cont
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 04 Aug 2015 14:14:17 +0200
parents 596927722403
children 9f66a12eb8fc
files Core/ImageFormats/ImageAccessor.cpp Core/Logging.h Core/Toolbox.cpp
diffstat 3 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Core/ImageFormats/ImageAccessor.cpp	Tue Aug 04 14:04:48 2015 +0200
+++ b/Core/ImageFormats/ImageAccessor.cpp	Tue Aug 04 14:14:17 2015 +0200
@@ -106,7 +106,10 @@
   {
     if (readOnly_)
     {
+#if ORTHANC_ENABLE_LOGGING == 1
       LOG(ERROR) << "Trying to write on a read-only image";
+#endif
+
       throw OrthancException(ErrorCode_ReadOnly);
     }
 
@@ -131,7 +134,10 @@
   {
     if (readOnly_)
     {
+#if ORTHANC_ENABLE_LOGGING == 1
       LOG(ERROR) << "Trying to write on a read-only image";
+#endif
+
       throw OrthancException(ErrorCode_ReadOnly);
     }
 
--- a/Core/Logging.h	Tue Aug 04 14:04:48 2015 +0200
+++ b/Core/Logging.h	Tue Aug 04 14:14:17 2015 +0200
@@ -90,4 +90,4 @@
   }
 }
 
-#endif
+#endif  // ORTHANC_ENABLE_LOGGING
--- a/Core/Toolbox.cpp	Tue Aug 04 14:04:48 2015 +0200
+++ b/Core/Toolbox.cpp	Tue Aug 04 14:14:17 2015 +0200
@@ -1132,7 +1132,10 @@
     if (pid == -1)
     {
       // Error in fork()
+#if ORTHANC_ENABLE_LOGGING == 1
       LOG(ERROR) << "Cannot fork a child process";
+#endif
+
       throw OrthancException(ErrorCode_SystemCommand);
     }
     else if (pid == 0)
@@ -1152,7 +1155,10 @@
 
     if (status != 0)
     {
+#if ORTHANC_ENABLE_LOGGING == 1
       LOG(ERROR) << "System command failed with status code " << status;
+#endif
+
       throw OrthancException(ErrorCode_SystemCommand);
     }
   }