mlog_configure added to main due to new loging system in monero

This commit is contained in:
moneroexamples 2017-01-16 23:20:53 +00:00
parent b8b54b36e2
commit f963c152cf
2 changed files with 3 additions and 17 deletions

View file

@ -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<string>("ssl-crt-file");
auto ssl_key_file_opt = opts.get_option<string>("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<uint16_t>(*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;

View file

@ -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)
{