From 4d71d463739fa20d21588266b70f58609d79cb2e Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Fri, 30 Nov 2018 16:52:50 +0000 Subject: [PATCH 1/3] mlocker: remove early page size log It comes before the logger is initialized, so gets displayed even though it should not be by default, and apparenly comes too early for (some versions of) Android, where it crashes. --- contrib/epee/src/mlocker.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/contrib/epee/src/mlocker.cpp b/contrib/epee/src/mlocker.cpp index c3262e8f4..4c48cbb58 100644 --- a/contrib/epee/src/mlocker.cpp +++ b/contrib/epee/src/mlocker.cpp @@ -47,7 +47,6 @@ static size_t query_page_size() MERROR("Failed to determine page size"); return 0; } - MINFO("Page size: " << ret); return ret; #else #warning Missing query_page_size implementation From 9b69a0ae019b366ad9511263680d6d08f50d6f25 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Fri, 30 Nov 2018 17:55:16 +0000 Subject: [PATCH 2/3] daemon: print monero version at startup when calling a detached daemon So people who want a timstamp get a timestamp --- src/daemon/main.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/daemon/main.cpp b/src/daemon/main.cpp index f483ba6c9..35017d9ef 100644 --- a/src/daemon/main.cpp +++ b/src/daemon/main.cpp @@ -216,6 +216,16 @@ int main(int argc, char const * argv[]) // after logs initialized tools::create_directories_if_necessary(data_dir.string()); +#ifdef STACK_TRACE + tools::set_stack_trace_log(log_file_path.filename().string()); +#endif // STACK_TRACE + + if (!command_line::is_arg_defaulted(vm, daemon_args::arg_max_concurrency)) + tools::set_max_concurrency(command_line::get_arg(vm, daemon_args::arg_max_concurrency)); + + // logging is now set up + MGINFO("Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")"); + // If there are positional options, we're running a daemon command { auto command = command_line::get_arg(vm, daemon_args::arg_command); @@ -276,16 +286,6 @@ int main(int argc, char const * argv[]) } } -#ifdef STACK_TRACE - tools::set_stack_trace_log(log_file_path.filename().string()); -#endif // STACK_TRACE - - if (!command_line::is_arg_defaulted(vm, daemon_args::arg_max_concurrency)) - tools::set_max_concurrency(command_line::get_arg(vm, daemon_args::arg_max_concurrency)); - - // logging is now set up - MGINFO("Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")"); - MINFO("Moving from main() into the daemonize now."); return daemonizer::daemonize(argc, argv, daemonize::t_executor{}, vm) ? 0 : 1; From ab783b1700fc14ed04bf14fc9df2c6c7b6e90a41 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Fri, 30 Nov 2018 17:58:58 +0000 Subject: [PATCH 3/3] easylogging++: ensure logger is initialized before main --- external/easylogging++/easylogging++.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/external/easylogging++/easylogging++.cc b/external/easylogging++/easylogging++.cc index d57f3f3a0..00b8b830b 100644 --- a/external/easylogging++/easylogging++.cc +++ b/external/easylogging++/easylogging++.cc @@ -2202,6 +2202,7 @@ el::base::type::StoragePointer el::base::Storage::getELPP() { return getresetELPP(false); } +static struct EnsureELPP { EnsureELPP() { el::base::Storage::getELPP(); } } ensureELPP; #if ELPP_ASYNC_LOGGING Storage::Storage(const LogBuilderPtr& defaultLogBuilder, base::IWorker* asyncDispatchWorker) : #else