changeset 5496:e4294feb0a3a

logs: display instance id when stored
author Alain Mazy <am@osimis.io>
date Tue, 23 Jan 2024 17:04:31 +0100
parents 4b3f5986eca1
children 4dd50c4b985a 7c5d30a3d5d2
files OrthancServer/Sources/ServerContext.cpp
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancServer/Sources/ServerContext.cpp	Mon Jan 22 17:14:11 2024 +0100
+++ b/OrthancServer/Sources/ServerContext.cpp	Tue Jan 23 17:04:31 2024 +0100
@@ -739,19 +739,19 @@
         switch (result.GetStatus())
         {
           case StoreStatus_Success:
-            LOG(INFO) << "New instance stored";
+            LOG(INFO) << "New instance stored (" << resultPublicId << ")";
             break;
 
           case StoreStatus_AlreadyStored:
-            LOG(INFO) << "Already stored";
+            LOG(INFO) << "Instance already stored (" << resultPublicId << ")";
             break;
 
           case StoreStatus_Failure:
-            LOG(ERROR) << "Unknown store failure";
+            LOG(ERROR) << "Unknown store failure while storing instance " << resultPublicId;
             throw OrthancException(ErrorCode_InternalError, HttpStatus_500_InternalServerError);
 
           case StoreStatus_StorageFull:
-            LOG(ERROR) << "Storage full";
+            LOG(ERROR) << "Storage full while storing instance " << resultPublicId;
             throw OrthancException(ErrorCode_FullStorage, HttpStatus_507_InsufficientStorage);
 
           default: