Merge pull request #4925

ab783b17 easylogging++: ensure logger is initialized before main (moneromooo-monero)
9b69a0ae daemon: print monero version at startup when calling a detached daemon (moneromooo-monero)
4d71d463 mlocker: remove early page size log (moneromooo-monero)
This commit is contained in:
Riccardo Spagni 2018-12-12 12:01:18 +02:00
commit 5e9225e637
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD
3 changed files with 11 additions and 11 deletions

View file

@ -53,7 +53,6 @@ static size_t query_page_size()
MERROR("Failed to determine page size"); MERROR("Failed to determine page size");
return 0; return 0;
} }
MINFO("Page size: " << ret);
return ret; return ret;
#else #else
#warning Missing query_page_size implementation #warning Missing query_page_size implementation

View file

@ -2197,6 +2197,7 @@ el::base::type::StoragePointer &el::base::Storage::getELPP()
el::base::elStorage = new el::base::Storage(el::LogBuilderPtr(new el::base::DefaultLogBuilder())); el::base::elStorage = new el::base::Storage(el::LogBuilderPtr(new el::base::DefaultLogBuilder()));
return el::base::elStorage; return el::base::elStorage;
} }
static struct EnsureELPP { EnsureELPP() { el::base::Storage::getELPP(); } } ensureELPP;
#if ELPP_ASYNC_LOGGING #if ELPP_ASYNC_LOGGING
Storage::Storage(const LogBuilderPtr& defaultLogBuilder, base::IWorker* asyncDispatchWorker) : Storage::Storage(const LogBuilderPtr& defaultLogBuilder, base::IWorker* asyncDispatchWorker) :
#else #else

View file

@ -216,6 +216,16 @@ int main(int argc, char const * argv[])
// after logs initialized // after logs initialized
tools::create_directories_if_necessary(data_dir.string()); 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 // If there are positional options, we're running a daemon command
{ {
auto command = command_line::get_arg(vm, daemon_args::arg_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."); MINFO("Moving from main() into the daemonize now.");
return daemonizer::daemonize(argc, argv, daemonize::t_executor{}, vm) ? 0 : 1; return daemonizer::daemonize(argc, argv, daemonize::t_executor{}, vm) ? 0 : 1;