From f963c152cf528c13f1151826aafc915a19cebdc1 Mon Sep 17 00:00:00 2001 From: moneroexamples Date: Mon, 16 Jan 2017 23:20:53 +0000 Subject: [PATCH] mlog_configure added to main due to new loging system in monero --- main.cpp | 12 +++--------- src/tools.h | 8 -------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/main.cpp b/main.cpp index d7b0cea..0bf260d 100644 --- a/main.cpp +++ b/main.cpp @@ -15,11 +15,6 @@ using boost::filesystem::path; using namespace std; -// needed for log system of momero -namespace epee { - unsigned int g_test_dbg_lock_sleep = 0; -} - int main(int ac, const char* av[]) { // get command line options @@ -45,11 +40,13 @@ int main(int ac, const char* av[]) { auto ssl_crt_file_opt = opts.get_option("ssl-crt-file"); auto ssl_key_file_opt = opts.get_option("ssl-key-file"); + // set monero log output level + uint32_t log_level = 0; + mlog_configure("", true); //cast port number in string to uint16 uint16_t app_port = boost::lexical_cast(*port_opt); - bool use_ssl {false}; string ssl_crt_file; @@ -94,9 +91,6 @@ int main(int ac, const char* av[]) { cout << blockchain_path << endl; - // enable basic monero log output - xmreg::enable_monero_log(); - // create instance of our MicroCore // and make pointer to the Blockchain xmreg::MicroCore mcore; diff --git a/src/tools.h b/src/tools.h index e66e5d8..75566b7 100644 --- a/src/tools.h +++ b/src/tools.h @@ -176,14 +176,6 @@ get_payment_id(const transaction& tx, crypto::hash8& payment_id8); -inline void -enable_monero_log() { - uint32_t log_level = 0; - epee::log_space::get_set_log_detalisation_level(true, log_level); - epee::log_space::log_singletone::add_logger(LOGGER_CONSOLE, NULL, NULL); -} - - inline double get_xmr(uint64_t core_amount) {