Mercurial > hg > orthanc
comparison OrthancServer/Sources/ServerContext.cpp @ 5496:e4294feb0a3a
logs: display instance id when stored
author | Alain Mazy <am@osimis.io> |
---|---|
date | Tue, 23 Jan 2024 17:04:31 +0100 |
parents | 48b8dae6dc77 |
children | 4dd50c4b985a |
comparison
equal
deleted
inserted
replaced
5495:4b3f5986eca1 | 5496:e4294feb0a3a |
---|---|
737 { | 737 { |
738 // skip logs in case of reconstruction | 738 // skip logs in case of reconstruction |
739 switch (result.GetStatus()) | 739 switch (result.GetStatus()) |
740 { | 740 { |
741 case StoreStatus_Success: | 741 case StoreStatus_Success: |
742 LOG(INFO) << "New instance stored"; | 742 LOG(INFO) << "New instance stored (" << resultPublicId << ")"; |
743 break; | 743 break; |
744 | 744 |
745 case StoreStatus_AlreadyStored: | 745 case StoreStatus_AlreadyStored: |
746 LOG(INFO) << "Already stored"; | 746 LOG(INFO) << "Instance already stored (" << resultPublicId << ")"; |
747 break; | 747 break; |
748 | 748 |
749 case StoreStatus_Failure: | 749 case StoreStatus_Failure: |
750 LOG(ERROR) << "Unknown store failure"; | 750 LOG(ERROR) << "Unknown store failure while storing instance " << resultPublicId; |
751 throw OrthancException(ErrorCode_InternalError, HttpStatus_500_InternalServerError); | 751 throw OrthancException(ErrorCode_InternalError, HttpStatus_500_InternalServerError); |
752 | 752 |
753 case StoreStatus_StorageFull: | 753 case StoreStatus_StorageFull: |
754 LOG(ERROR) << "Storage full"; | 754 LOG(ERROR) << "Storage full while storing instance " << resultPublicId; |
755 throw OrthancException(ErrorCode_FullStorage, HttpStatus_507_InsufficientStorage); | 755 throw OrthancException(ErrorCode_FullStorage, HttpStatus_507_InsufficientStorage); |
756 | 756 |
757 default: | 757 default: |
758 // This should never happen | 758 // This should never happen |
759 break; | 759 break; |