# HG changeset patch # User Sebastien Jodogne # Date 1604384373 -3600 # Node ID 1661544ea94d0de40cace0104d528b9183e786c1 # Parent 1bd14c9006991743a6480a37f18f90b7d5e326ca LogCategory_REST diff -r 1bd14c900699 -r 1661544ea94d OrthancFramework/Sources/Logging.cpp --- a/OrthancFramework/Sources/Logging.cpp Tue Nov 03 07:15:44 2020 +0100 +++ b/OrthancFramework/Sources/Logging.cpp Tue Nov 03 07:19:33 2020 +0100 @@ -203,6 +203,10 @@ { return LogCategory_PLUGINS; } + else if (category == "rest") + { + return LogCategory_REST; + } else if (category == "dicom") { return LogCategory_DICOM; diff -r 1bd14c900699 -r 1661544ea94d OrthancFramework/Sources/Logging.h --- a/OrthancFramework/Sources/Logging.h Tue Nov 03 07:15:44 2020 +0100 +++ b/OrthancFramework/Sources/Logging.h Tue Nov 03 07:19:33 2020 +0100 @@ -62,8 +62,9 @@ { LogCategory_GENERIC = (1 << 0), LogCategory_PLUGINS = (1 << 1), - LogCategory_SQLITE = (1 << 2), - LogCategory_DICOM = (1 << 3) + LogCategory_REST = (1 << 2), + LogCategory_SQLITE = (1 << 3), + LogCategory_DICOM = (1 << 4) }; ORTHANC_PUBLIC const char* EnumerationToString(LogLevel level); diff -r 1bd14c900699 -r 1661544ea94d OrthancServer/Sources/OrthancRestApi/OrthancRestApi.cpp --- a/OrthancServer/Sources/OrthancRestApi/OrthancRestApi.cpp Tue Nov 03 07:15:44 2020 +0100 +++ b/OrthancServer/Sources/OrthancRestApi/OrthancRestApi.cpp Tue Nov 03 07:19:33 2020 +0100 @@ -113,7 +113,7 @@ { ServerContext& context = OrthancRestApi::GetContext(call); - LOG(INFO) << "Receiving a DICOM file of " << call.GetBodySize() << " bytes through HTTP"; + CLOG(INFO, REST) << "Receiving a DICOM file of " << call.GetBodySize() << " bytes through HTTP"; if (call.GetBodySize() == 0) { diff -r 1bd14c900699 -r 1661544ea94d OrthancServer/Sources/OrthancRestApi/OrthancRestModalities.cpp --- a/OrthancServer/Sources/OrthancRestApi/OrthancRestModalities.cpp Tue Nov 03 07:15:44 2020 +0100 +++ b/OrthancServer/Sources/OrthancRestApi/OrthancRestModalities.cpp Tue Nov 03 07:19:33 2020 +0100 @@ -1587,8 +1587,8 @@ for (size_t j = 0; j < orthancId.size(); j++) { - LOG(INFO) << "Storage commitment - Removing SOP instance UID / Orthanc ID: " - << sopInstanceUids[i] << " / " << orthancId[j]; + CLOG(INFO, REST) << "Storage commitment - Removing SOP instance UID / Orthanc ID: " + << sopInstanceUids[i] << " / " << orthancId[j]; Json::Value tmp; context.GetIndex().DeleteResource(tmp, orthancId[j], ResourceType_Instance); diff -r 1bd14c900699 -r 1661544ea94d OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp --- a/OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp Tue Nov 03 07:15:44 2020 +0100 +++ b/OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp Tue Nov 03 07:19:33 2020 +0100 @@ -1351,12 +1351,12 @@ if (ok) { - LOG(INFO) << "The attachment " << name << " of resource " << publicId << " has the right MD5"; + CLOG(INFO, REST) << "The attachment " << name << " of resource " << publicId << " has the right MD5"; call.GetOutput().AnswerBuffer("{}", MimeType_Json); } else { - LOG(INFO) << "The attachment " << name << " of resource " << publicId << " has bad MD5!"; + CLOG(INFO, REST) << "The attachment " << name << " of resource " << publicId << " has bad MD5!"; } }