Mercurial > hg > orthanc
comparison OrthancServer/Internals/FindScp.cpp @ 101:428784e59dcd
trying to use log4cplus
author | jodogne |
---|---|
date | Wed, 03 Oct 2012 11:44:46 +0200 |
parents | a70bb32802ae |
children | 7593b57dc1bf |
comparison
equal
deleted
inserted
replaced
100:27dc762e3dc8 | 101:428784e59dcd |
---|---|
20 | 20 |
21 #include "FindScp.h" | 21 #include "FindScp.h" |
22 | 22 |
23 #include "../FromDcmtkBridge.h" | 23 #include "../FromDcmtkBridge.h" |
24 #include "../ToDcmtkBridge.h" | 24 #include "../ToDcmtkBridge.h" |
25 #include "DcmtkLogging.h" | |
25 #include "../../Core/OrthancException.h" | 26 #include "../../Core/OrthancException.h" |
26 | 27 |
27 #include <dcmtk/dcmdata/dcfilefo.h> | 28 #include <dcmtk/dcmdata/dcfilefo.h> |
28 #include <dcmtk/dcmdata/dcmetinf.h> | 29 #include <dcmtk/dcmdata/dcmetinf.h> |
29 #include <dcmtk/dcmdata/dcostrmb.h> | 30 #include <dcmtk/dcmdata/dcostrmb.h> |
31 #include <dcmtk/dcmnet/diutil.h> | 32 #include <dcmtk/dcmnet/diutil.h> |
32 | 33 |
33 | 34 |
34 namespace Orthanc | 35 namespace Orthanc |
35 { | 36 { |
36 namespace Internals | |
37 { | |
38 extern OFLogger Logger; | |
39 } | |
40 | |
41 | |
42 namespace | 37 namespace |
43 { | 38 { |
44 struct FindScpData | 39 struct FindScpData |
45 { | 40 { |
46 IFindRequestHandler* handler_; | 41 IFindRequestHandler* handler_; |
75 data.handler_->Handle(data.input_, data.answers_); | 70 data.handler_->Handle(data.input_, data.answers_); |
76 } | 71 } |
77 catch (OrthancException& e) | 72 catch (OrthancException& e) |
78 { | 73 { |
79 // Internal error! | 74 // Internal error! |
80 OFLOG_ERROR(Internals::Logger, "IFindRequestHandler Failed: " << e.What()); | 75 LOG4CPP_ERROR(Internals::GetLogger(), "IFindRequestHandler Failed: " + std::string(e.What())); |
81 response->DimseStatus = STATUS_FIND_Failed_UnableToProcess; | 76 response->DimseStatus = STATUS_FIND_Failed_UnableToProcess; |
82 *responseIdentifiers = NULL; | 77 *responseIdentifiers = NULL; |
83 return; | 78 return; |
84 } | 79 } |
85 | 80 |
123 | 118 |
124 // if some error occured, dump corresponding information and remove the outfile if necessary | 119 // if some error occured, dump corresponding information and remove the outfile if necessary |
125 if (cond.bad()) | 120 if (cond.bad()) |
126 { | 121 { |
127 OFString temp_str; | 122 OFString temp_str; |
128 OFLOG_ERROR(Internals::Logger, "Find SCP Failed: " << DimseCondition::dump(temp_str, cond)); | 123 LOG4CPP_ERROR(Internals::GetLogger(), "Find SCP Failed: " + std::string(cond.text())); |
129 } | 124 } |
130 | 125 |
131 return cond; | 126 return cond; |
132 } | 127 } |
133 } | 128 } |