Mercurial > hg > orthanc
comparison UnitTests/main.cpp @ 101:428784e59dcd
trying to use log4cplus
author | jodogne |
---|---|
date | Wed, 03 Oct 2012 11:44:46 +0200 |
parents | 27dc762e3dc8 |
children | 7593b57dc1bf |
comparison
equal
deleted
inserted
replaced
100:27dc762e3dc8 | 101:428784e59dcd |
---|---|
279 printf("[%s]\n", Toolbox::GetDirectoryOfExecutable().c_str()); | 279 printf("[%s]\n", Toolbox::GetDirectoryOfExecutable().c_str()); |
280 } | 280 } |
281 | 281 |
282 | 282 |
283 | 283 |
284 #include "../Core/Logging.h" | |
285 | |
284 #if DCMTK_BUNDLES_LOG4CPLUS == 0 | 286 #if DCMTK_BUNDLES_LOG4CPLUS == 0 |
285 #include <log4cplus/logger.h> | |
286 #include <log4cplus/consoleappender.h> | 287 #include <log4cplus/consoleappender.h> |
287 #include <log4cplus/fileappender.h> | 288 #include <log4cplus/fileappender.h> |
288 #include <log4cplus/configurator.h> | 289 #include <log4cplus/configurator.h> |
289 #else | 290 #else |
290 #include <dcmtk/oflog/logger.h> | |
291 #include <dcmtk/oflog/consap.h> | 291 #include <dcmtk/oflog/consap.h> |
292 #include <dcmtk/oflog/fileap.h> | 292 #include <dcmtk/oflog/fileap.h> |
293 //#include <dcmtk/oflog/configurator.h> | 293 //#include <dcmtk/oflog/configurator.h> |
294 #endif | 294 #endif |
295 | 295 |
296 | 296 |
297 static log4cplus::Logger logger(log4cplus::Logger::getInstance("UnitTests")); | 297 static log4cplus::Logger logger(log4cplus::Logger::getInstance("UnitTests")); |
298 | 298 |
299 TEST(Logger, Basic) | 299 TEST(Logger, Basic) |
300 { | 300 { |
301 LOG4CPLUS_INFO(logger, "I say hello"); | 301 LOG4CPP_INFO(logger, "I say hello"); |
302 } | 302 } |
303 | 303 |
304 | 304 |
305 int main(int argc, char **argv) | 305 int main(int argc, char **argv) |
306 { | 306 { |