diff options
| author | Riccardo Spagni <ric@spagni.net> | 2017-01-15 20:31:16 -0500 |
|---|---|---|
| committer | Riccardo Spagni <ric@spagni.net> | 2017-01-15 20:31:16 -0500 |
| commit | ac7df193ca47261c2dfd91b230489e20955013a2 (patch) | |
| tree | e4d312059948a0528583e7ea58d2c0b40307a494 /tests/core_tests/chaingen_main.cpp | |
| parent | e459d8604df600d3094fba269ecbcf22867cf171 (diff) | |
| parent | 5833d66f6540e7b34e10ddef37c2b67bd501994b (diff) | |
| download | monzero-core-ac7df193ca47261c2dfd91b230489e20955013a2.tar.gz monzero-core-ac7df193ca47261c2dfd91b230489e20955013a2.tar.xz monzero-core-ac7df193ca47261c2dfd91b230489e20955013a2.zip | |
Merge pull request #1522
5833d66f Change logging to easylogging++ (moneromooo-monero)
dc98019b easylogging++: fix logging with static const header only data members (moneromooo-monero)
3b46617b easylogging++: add ELPP_DISABLE_CHECK_MACROS (moneromooo-monero)
6fe39d90 easylogging++: allow clipping a common filename prefix (moneromooo-monero)
43abf6ff easylogging++: add file-only logs (moneromooo-monero)
c313bea4 eayslogging++: Fix bad memory access before opening any files (moneromooo-monero)
0af5d168 easylogging++: avoid creating directory/filename for the builtin default log file (moneromooo-monero)
28362847 easylogging++: allow setting thread names (moneromooo-monero)
ec71ce8d easylogging++: Print thread ID in a nicer way (moneromooo-monero)
2a0bf783 easylogging++: Add logging categories (moneromooo-monero)
c50bbbfe easylogging++: import upstream (moneromooo-monero)
Diffstat (limited to 'tests/core_tests/chaingen_main.cpp')
| -rw-r--r-- | tests/core_tests/chaingen_main.cpp | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/tests/core_tests/chaingen_main.cpp b/tests/core_tests/chaingen_main.cpp index 09cdb9227..557e3f07c 100644 --- a/tests/core_tests/chaingen_main.cpp +++ b/tests/core_tests/chaingen_main.cpp @@ -50,13 +50,9 @@ int main(int argc, char* argv[]) epee::string_tools::set_module_name_and_folder(argv[0]); //set up logging options - epee::log_space::get_set_log_detalisation_level(true, LOG_LEVEL_3); - epee::log_space::log_singletone::add_logger(LOGGER_CONSOLE, NULL, NULL, LOG_LEVEL_2); + mlog_configure(mlog_get_default_log_path("core_tests.log"), true); + mlog_set_log_level(3); - epee::log_space::log_singletone::add_logger(LOGGER_FILE, - epee::log_space::log_singletone::get_default_log_file().c_str(), - epee::log_space::log_singletone::get_default_log_folder().c_str()); - po::options_description desc_options("Allowed options"); command_line::add_arg(desc_options, command_line::arg_help); command_line::add_arg(desc_options, arg_test_data_path); @@ -202,19 +198,18 @@ int main(int argc, char* argv[]) GENERATE_AND_PLAY(gen_rct_tx_pre_rct_altered_extra); GENERATE_AND_PLAY(gen_rct_tx_rct_altered_extra); - std::cout << (failed_tests.empty() ? concolor::green : concolor::magenta); - std::cout << "\nREPORT:\n"; - std::cout << " Test run: " << tests_count << '\n'; - std::cout << " Failures: " << failed_tests.size() << '\n'; + el::Level level = (failed_tests.empty() ? el::Level::Info : el::Level::Error); + MLOG(level, "\nREPORT:"); + MLOG(level, " Test run: " << tests_count); + MLOG(level, " Failures: " << failed_tests.size()); if (!failed_tests.empty()) { - std::cout << "FAILED TESTS:\n"; + MLOG(level, "FAILED TESTS:"); BOOST_FOREACH(auto test_name, failed_tests) { - std::cout << " " << test_name << '\n'; + MLOG(level, " " << test_name); } } - std::cout << concolor::normal << std::endl; } else if (command_line::get_arg(vm, arg_test_transactions)) { @@ -222,8 +217,7 @@ int main(int argc, char* argv[]) } else { - std::cout << concolor::magenta << "Wrong arguments" << concolor::normal << std::endl; - std::cout << desc_options << std::endl; + MERROR("Wrong arguments"); return 2; } |
