Mercurial > hg > orthanc-stone
view Samples/Common/SampleHelpers.h @ 1415:998697c5ec74
Added useProgressiveQuality flag to LoaderCache ctor
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Mon, 11 May 2020 09:50:02 +0200 |
parents | dfb48f0794b1 |
children | 15173a383a00 |
line wrap: on
line source
#pragma once #include <Core/Logging.h> #include <boost/algorithm/string.hpp> #include <string> #include <iostream> namespace OrthancStoneHelpers { inline void SetLogLevel(std::string logLevel) { boost::to_lower(logLevel); if (logLevel == "warning") { Orthanc::Logging::EnableInfoLevel(false); Orthanc::Logging::EnableTraceLevel(false); } else if (logLevel == "info") { Orthanc::Logging::EnableInfoLevel(true); Orthanc::Logging::EnableTraceLevel(false); } else if (logLevel == "trace") { Orthanc::Logging::EnableInfoLevel(true); Orthanc::Logging::EnableTraceLevel(true); } else { std::cerr << "Unknown log level \"" << logLevel << "\". Will use TRACE as default!"; Orthanc::Logging::EnableInfoLevel(true); Orthanc::Logging::EnableTraceLevel(true); } } }