Mercurial > hg > orthanc
diff OrthancServer/main.cpp @ 3526:f07352e0375c
new configuration option ExecuteLuaEnabled
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 26 Sep 2019 10:03:35 +0200 |
parents | d2b9981017c4 |
children | 2090ec6a83a5 |
line wrap: on
line diff
--- a/OrthancServer/main.cpp Wed Sep 25 17:16:54 2019 +0200 +++ b/OrthancServer/main.cpp Thu Sep 26 10:03:35 2019 +0200 @@ -516,6 +516,7 @@ << " --logfile=[file]\tfile where to store the log of Orthanc" << std::endl << "\t\t\t(by default, the log is dumped to stderr)" << std::endl << " --config=[file]\tcreate a sample configuration file and exit" << std::endl + << "\t\t\t(if file is \"-\", dumps to stdout)" << std::endl << " --errors\t\tprint the supported error codes and exit" << std::endl << " --verbose\t\tbe verbose in logs" << std::endl << " --trace\t\thighest verbosity in logs (for debug)" << std::endl @@ -1436,7 +1437,15 @@ try { - SystemToolbox::WriteFile(configurationSample, target); + if (target == "-") + { + // New in 1.5.8: Print to stdout + std::cout << configurationSample; + } + else + { + SystemToolbox::WriteFile(configurationSample, target); + } return 0; } catch (OrthancException&)