comparison OrthancServer/Internals/MoveScp.cpp @ 102:7593b57dc1bf

switch to google log
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 03 Oct 2012 16:28:13 +0200
parents 428784e59dcd
children e759f777cb72
comparison
equal deleted inserted replaced
101:428784e59dcd 102:7593b57dc1bf
23 #include <memory> 23 #include <memory>
24 24
25 #include "../FromDcmtkBridge.h" 25 #include "../FromDcmtkBridge.h"
26 #include "../ToDcmtkBridge.h" 26 #include "../ToDcmtkBridge.h"
27 #include "../../Core/OrthancException.h" 27 #include "../../Core/OrthancException.h"
28 #include "DcmtkLogging.h"
29 28
30 #include <dcmtk/dcmdata/dcfilefo.h> 29 #include <dcmtk/dcmdata/dcfilefo.h>
31 #include <dcmtk/dcmdata/dcmetinf.h> 30 #include <dcmtk/dcmdata/dcmetinf.h>
32 #include <dcmtk/dcmdata/dcostrmb.h> 31 #include <dcmtk/dcmdata/dcostrmb.h>
33 #include <dcmtk/dcmdata/dcdeftag.h> 32 #include <dcmtk/dcmdata/dcdeftag.h>
34 #include <dcmtk/dcmnet/diutil.h> 33 #include <dcmtk/dcmnet/diutil.h>
34 #include <glog/logging.h>
35 35
36 36
37 namespace Orthanc 37 namespace Orthanc
38 { 38 {
39 namespace 39 namespace
80 data.warningCount_ = 0; 80 data.warningCount_ = 0;
81 } 81 }
82 catch (OrthancException& e) 82 catch (OrthancException& e)
83 { 83 {
84 // Internal error! 84 // Internal error!
85 LOG4CPP_ERROR(Internals::GetLogger(), "IMoveRequestHandler Failed: " + std::string(e.What())); 85 LOG(ERROR) << "IMoveRequestHandler Failed: " << e.What();
86 response->DimseStatus = STATUS_MOVE_Failed_UnableToProcess; 86 response->DimseStatus = STATUS_MOVE_Failed_UnableToProcess;
87 return; 87 return;
88 } 88 }
89 89
90 data.lastRequest_ = requestIdentifiers; 90 data.lastRequest_ = requestIdentifiers;
109 status = data.iterator_->DoNext(); 109 status = data.iterator_->DoNext();
110 } 110 }
111 catch (OrthancException& e) 111 catch (OrthancException& e)
112 { 112 {
113 // Internal error! 113 // Internal error!
114 LOG4CPP_ERROR(Internals::GetLogger(), "IMoveRequestHandler Failed: " + std::string(e.What())); 114 LOG(ERROR) << "IMoveRequestHandler Failed: " << e.What();
115 response->DimseStatus = STATUS_MOVE_Failed_UnableToProcess; 115 response->DimseStatus = STATUS_MOVE_Failed_UnableToProcess;
116 return; 116 return;
117 } 117 }
118 118
119 if (status == IMoveRequestIterator::Status_Failure) 119 if (status == IMoveRequestIterator::Status_Failure)
160 160
161 // if some error occured, dump corresponding information and remove the outfile if necessary 161 // if some error occured, dump corresponding information and remove the outfile if necessary
162 if (cond.bad()) 162 if (cond.bad())
163 { 163 {
164 OFString temp_str; 164 OFString temp_str;
165 LOG4CPP_ERROR(Internals::GetLogger(), "Move SCP Failed: " + std::string(cond.text())); 165 LOG(ERROR) << "Move SCP Failed: " << cond.text();
166 } 166 }
167 167
168 return cond; 168 return cond;
169 } 169 }
170 } 170 }