mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-28 07:35:52 +00:00
config file improvements (#241)
* remove log_to_file param * change the place of workers
This commit is contained in:
@@ -115,8 +115,7 @@ initLogging(boost::json::object const& config)
|
||||
{
|
||||
boost::log::add_console_log(std::cout, keywords::format = format);
|
||||
}
|
||||
if (config.contains("log_to_file") && config.at("log_to_file").as_bool() &&
|
||||
config.contains("log_directory"))
|
||||
if (config.contains("log_directory"))
|
||||
{
|
||||
if (!config.at("log_directory").is_string())
|
||||
throw std::runtime_error("log directory must be a string");
|
||||
|
||||
@@ -321,8 +321,8 @@ make_HttpServer(
|
||||
static_cast<unsigned short>(serverConfig.at("port").as_int64());
|
||||
|
||||
uint32_t numThreads = std::thread::hardware_concurrency();
|
||||
if (serverConfig.contains("workers"))
|
||||
numThreads = serverConfig.at("workers").as_int64();
|
||||
if (config.contains("workers"))
|
||||
numThreads = config.at("workers").as_int64();
|
||||
uint32_t maxQueueSize = 0; // no max
|
||||
if (serverConfig.contains("max_queue_size"))
|
||||
maxQueueSize = serverConfig.at("max_queue_size").as_int64();
|
||||
|
||||
Reference in New Issue
Block a user