[DEV] add help in test

This commit is contained in:
Edouard DUPIN 2015-01-13 22:29:26 +01:00
parent 05b418a6e3
commit d528a68c14
2 changed files with 15 additions and 2 deletions

View File

@ -1,7 +1,7 @@
/** /**
* @author Edouard DUPIN * @author Edouard DUPIN
* *
* @copyright 2011, Edouard DUPIN, all right reserved * @copyright 2014, Edouard DUPIN, all right reserved
* *
* @license APACHE v2.0 (see license file) * @license APACHE v2.0 (see license file)
*/ */
@ -45,6 +45,19 @@ int main(int argc, const char *argv[]) {
etk::log::setLevel(etk::log::logLevelDebug); etk::log::setLevel(etk::log::logLevelDebug);
} else if (data == "-l6") { } else if (data == "-l6") {
etk::log::setLevel(etk::log::logLevelVerbose); etk::log::setLevel(etk::log::logLevelVerbose);
} else if ( data == "-h"
|| data == "--help") {
std::cout << "Help : " <<std::endl;
std::cout << " ./xxx [options]" <<std::endl;
std::cout << " -l0: debug None" <<std::endl;
std::cout << " -l1: debug Critical" <<std::endl;
std::cout << " -l2: debug Error" <<std::endl;
std::cout << " -l3: debug Warning" <<std::endl;
std::cout << " -l4: debug Info" <<std::endl;
std::cout << " -l5: debug Debug" <<std::endl;
std::cout << " -l6: debug Verbose" <<std::endl;
std::cout << " -h/--help: this help" <<std::endl;
exit(0);
} }
} }
etk::setArgZero(argv[0]); etk::setArgZero(argv[0]);

View File

@ -1,7 +1,7 @@
/** /**
* @author Edouard DUPIN * @author Edouard DUPIN
* *
* @copyright 2011, Edouard DUPIN, all right reserved * @copyright 2014, Edouard DUPIN, all right reserved
* *
* @license APACHE v2.0 (see license file) * @license APACHE v2.0 (see license file)
*/ */