Mercurial > hg > orthanc
changeset 1142:952cf9b6be83
Configuration option to disable the logging of exported resources
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 11 Sep 2014 10:23:22 +0200 |
parents | 2ff467bcfb98 |
children | 8bff277e6886 |
files | NEWS OrthancServer/OrthancRestApi/OrthancRestModalities.cpp Resources/Configuration.json |
diffstat | 3 files changed, 16 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/NEWS Thu Sep 11 10:00:46 2014 +0200 +++ b/NEWS Thu Sep 11 10:23:22 2014 +0200 @@ -14,6 +14,7 @@ ----- * Configuration option to enable HTTP Keep-Alive +* Configuration option to disable the logging of exported resources in "/exports" * Refactoring of HttpOutput ("Content-Length" header is now always sent) * "/tools/create-dicom" now accepts the "PatientID" DICOM tag (+ updated sample) * Upgrade to Mongoose 3.8
--- a/OrthancServer/OrthancRestApi/OrthancRestModalities.cpp Thu Sep 11 10:00:46 2014 +0200 +++ b/OrthancServer/OrthancRestApi/OrthancRestModalities.cpp Thu Sep 11 10:23:22 2014 +0200 @@ -292,7 +292,11 @@ if (request.isString()) { - context.GetIndex().LogExportedResource(request.asString(), remote); + if (Configuration::GetGlobalBoolParameter("LogExportedResources", true)) + { + context.GetIndex().LogExportedResource(request.asString(), remote); + } + context.GetIndex().GetChildInstances(instances, request.asString()); } else if (request.isArray()) @@ -310,7 +314,10 @@ return false; } - context.GetIndex().LogExportedResource(stripped, remote); + if (Configuration::GetGlobalBoolParameter("LogExportedResources", true)) + { + context.GetIndex().LogExportedResource(stripped, remote); + } std::list<std::string> tmp; context.GetIndex().GetChildInstances(tmp, stripped);
--- a/Resources/Configuration.json Thu Sep 11 10:00:46 2014 +0200 +++ b/Resources/Configuration.json Thu Sep 11 10:23:22 2014 +0200 @@ -189,6 +189,12 @@ // some job finishes. "LimitJobs" : 10, + // If this option is set to "false", Orthanc will not log the + // resources that are exported to other DICOM modalities of Orthanc + // peers in the URI "/exports". This is useful to prevent the index + // to grow indefinitely in auto-routing tasks. + "LogExportedResources" : true, + // Enable or disable HTTP Keep-Alive (experimental). Set this option // to "true" only in the case of high HTTP loads. "KeepAlive" : false,