diff options
author | RALOVICH, Kristof <tade60@freemail.hu> | 2014-01-19 19:44:35 +0100 |
---|---|---|
committer | RALOVICH, Kristof <tade60@freemail.hu> | 2014-01-19 19:44:35 +0100 |
commit | b8f307abae6908a517d4562ffab3569aefb042e3 (patch) | |
tree | c8d3904ff90292ea21d6369a9f3da1f9bdc8e1f3 /src | |
parent | 2b305b9ebd04d00c6ba4b3813d8d7310b8313973 (diff) |
downloader: more debugging info
Diffstat (limited to 'src')
-rw-r--r-- | src/antpm-downloader.cpp | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/src/antpm-downloader.cpp b/src/antpm-downloader.cpp index 04ad0e9..2d1b1dd 100644 --- a/src/antpm-downloader.cpp +++ b/src/antpm-downloader.cpp @@ -133,19 +133,19 @@ main(int argc, char** argv) signal(SIGINT, my_handler); #endif -#ifndef NDEBUG - antpm::Log::instance()->setLogReportingLevel(antpm::LOG_DBG); -#else + antpm::Log::instance()->addSink(std::cout); +#ifdef NDEBUG antpm::Log::instance()->setLogReportingLevel(antpm::LOG_INF); +#else + antpm::Log::instance()->setLogReportingLevel(antpm::LOG_DBG); #endif - antpm::Log::instance()->addSink(std::cout); // Declare the supported options. - bool pairing =false; - bool dirOnly =false; - uint16_t dlFileIdx =0x0000; - uint16_t eraseFileIdx=0x0000; - int verbosityLevel = antpm::Log::instance()->getLogReportingLevel(); + bool pairing = false; + bool dirOnly = false; + uint16_t dlFileIdx = 0x0000; + uint16_t eraseFileIdx = 0x0000; + int verbosityLevel = antpm::Log::instance()->getLogReportingLevel(); po::options_description desc("Allowed options"); desc.add_options() ("help,h", "produce help message") @@ -206,9 +206,13 @@ main(int argc, char** argv) logger() << desc << "\n"; return EXIT_SUCCESS; } - LOG_VAR4(pairing, dirOnly, int(dlFileIdx), int(eraseFileIdx)); + LOG_VAR5(pairing, dirOnly, dlFileIdx, eraseFileIdx, verbosityLevel); - LOG(antpm::LOG_DBG) << argv[0] << antpm::getVersionString() << "\n"; + LOG(antpm::LOG_DBG) << argv[0] << " " << antpm::getVersionString() << "\n"; + for(int i = 0; i < argc; i++) + { + LOG(antpm::LOG_DBG2) << "\targv[" << i << "]\t\"" << argv[i] << "\"" << endl; + } char* ANTPM_405 = getenv("ANTPM_405"); if(ANTPM_405!=NULL && strncmp("1",ANTPM_405,1)==0) |