mirror of
https://github.com/XRPLF/clio.git
synced 2026-04-29 15:37:53 +00:00
chore: Move config definition to cpp file (#2371)
Having such a long init list in almost every translation unit is definitely not nice. It makes it more difficult to work on custom logger (because I need to adjust log_format), so let's move it to cpp file
This commit is contained in:
@@ -53,6 +53,7 @@ try {
|
||||
if (not app::parseConfig(run.configPath))
|
||||
return EXIT_FAILURE;
|
||||
|
||||
ClioConfigDefinition& gClioConfig = getClioConfig();
|
||||
PrometheusService::init(gClioConfig);
|
||||
if (auto const initSuccess = util::LogService::init(gClioConfig); not initSuccess) {
|
||||
std::cerr << initSuccess.error() << std::endl;
|
||||
@@ -65,11 +66,11 @@ try {
|
||||
if (not app::parseConfig(migrate.configPath))
|
||||
return EXIT_FAILURE;
|
||||
|
||||
if (auto const initSuccess = util::LogService::init(gClioConfig); not initSuccess) {
|
||||
if (auto const initSuccess = util::LogService::init(getClioConfig()); not initSuccess) {
|
||||
std::cerr << initSuccess.error() << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
app::MigratorApplication migrator{gClioConfig, migrate.subCmd};
|
||||
app::MigratorApplication migrator{getClioConfig(), migrate.subCmd};
|
||||
return migrator.run();
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user