Mercurial > hg > orthanc
comparison OrthancServer/main.cpp @ 137:0e97abc7b950
fix of a bug in older versions of sqlite
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 10 Oct 2012 13:13:14 +0200 |
parents | fe180eae201d |
children | 00604c758004 |
comparison
equal
deleted
inserted
replaced
136:fe180eae201d | 137:0e97abc7b950 |
---|---|
111 << "If no configuration file is given on the command line, a set of default parameters " << std::endl | 111 << "If no configuration file is given on the command line, a set of default parameters " << std::endl |
112 << "is used. Please refer to the Orthanc homepage for the full instructions about how to use Orthanc " << std::endl | 112 << "is used. Please refer to the Orthanc homepage for the full instructions about how to use Orthanc " << std::endl |
113 << "<https://code.google.com/p/orthanc/wiki/OrthancCookbook>." << std::endl | 113 << "<https://code.google.com/p/orthanc/wiki/OrthancCookbook>." << std::endl |
114 << std::endl | 114 << std::endl |
115 << "Command-line options:" << std::endl | 115 << "Command-line options:" << std::endl |
116 << " --verbose\t\tbe verbose in logs" << std::endl | |
117 << " --trace\t\thighest verbosity in logs (for debug)" << std::endl | |
116 << " --help\t\tdisplay this help and exit" << std::endl | 118 << " --help\t\tdisplay this help and exit" << std::endl |
117 << " --version\t\toutput version information and exit" << std::endl | 119 << " --version\t\toutput version information and exit" << std::endl |
118 << " --logdir=[dir]\tdirectory where to store the log files" << std::endl | 120 << " --logdir=[dir]\tdirectory where to store the log files" << std::endl |
119 << "\t\t\t(if not used, the logs are dumped to stderr)" << std::endl | 121 << "\t\t\t(if not used, the logs are dumped to stderr)" << std::endl |
120 << std::endl | 122 << std::endl |
140 | 142 |
141 int main(int argc, char* argv[]) | 143 int main(int argc, char* argv[]) |
142 { | 144 { |
143 // Initialize Google's logging library. | 145 // Initialize Google's logging library. |
144 FLAGS_logtostderr = true; | 146 FLAGS_logtostderr = true; |
147 FLAGS_minloglevel = 1; | |
148 FLAGS_v = 0; | |
145 | 149 |
146 for (int i = 1; i < argc; i++) | 150 for (int i = 1; i < argc; i++) |
147 { | 151 { |
148 if (std::string(argv[i]) == "--help") | 152 if (std::string(argv[i]) == "--help") |
149 { | 153 { |
153 | 157 |
154 if (std::string(argv[i]) == "--version") | 158 if (std::string(argv[i]) == "--version") |
155 { | 159 { |
156 PrintVersion(argv[0]); | 160 PrintVersion(argv[0]); |
157 return 0; | 161 return 0; |
162 } | |
163 | |
164 if (std::string(argv[i]) == "--verbose") | |
165 { | |
166 FLAGS_minloglevel = 0; | |
167 } | |
168 | |
169 if (std::string(argv[i]) == "--trace") | |
170 { | |
171 FLAGS_minloglevel = 0; | |
172 FLAGS_v = 1; | |
158 } | 173 } |
159 | 174 |
160 if (boost::starts_with(argv[i], "--logdir=")) | 175 if (boost::starts_with(argv[i], "--logdir=")) |
161 { | 176 { |
162 FLAGS_logtostderr = false; | 177 FLAGS_logtostderr = false; |
233 | 248 |
234 // GO !!! | 249 // GO !!! |
235 httpServer.Start(); | 250 httpServer.Start(); |
236 dicomServer.Start(); | 251 dicomServer.Start(); |
237 | 252 |
238 LOG(INFO) << "The server has started"; | 253 LOG(WARNING) << "Orthanc has started"; |
239 Toolbox::ServerBarrier(); | 254 Toolbox::ServerBarrier(); |
240 | 255 |
241 // Stop | 256 // Stop |
242 LOG(INFO) << "The server is stopping"; | 257 LOG(WARNING) << "Orthanc is stopping"; |
243 } | 258 } |
244 | 259 |
245 storeScp.Done(); | 260 storeScp.Done(); |
246 } | 261 } |
247 catch (OrthancException& e) | 262 catch (OrthancException& e) |