mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-26 05:55:51 +00:00
Add command line option --quiet.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
//
|
||||
// TODO: Check permissions on config file before using it.
|
||||
//
|
||||
#include "Config.h"
|
||||
|
||||
#include "utils.h"
|
||||
@@ -48,7 +51,7 @@
|
||||
|
||||
Config theConfig;
|
||||
|
||||
void Config::setup(const std::string& strConf)
|
||||
void Config::setup(const std::string& strConf, bool bQuiet)
|
||||
{
|
||||
boost::system::error_code ec;
|
||||
|
||||
@@ -58,6 +61,8 @@ void Config::setup(const std::string& strConf)
|
||||
// that with "db" as the data directory.
|
||||
//
|
||||
|
||||
QUIET = bQuiet;
|
||||
|
||||
if (!strConf.empty())
|
||||
{
|
||||
// --conf=<path> : everything is relative that file.
|
||||
@@ -172,7 +177,8 @@ void Config::setup(const std::string& strConf)
|
||||
|
||||
void Config::load()
|
||||
{
|
||||
std::cout << "Loading: " << CONFIG_FILE << std::endl;
|
||||
if (!QUIET)
|
||||
std::cerr << "Loading: " << CONFIG_FILE << std::endl;
|
||||
|
||||
std::ifstream ifsConfig(CONFIG_FILE.c_str(), std::ios::in);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user