Skip to content
This repository was archived by the owner on Apr 17, 2019. It is now read-only.

Commit 5a47e9f

Browse files
authored
Fix verbosity flag (#1942)
Signed-off-by: Andrei Lebedev <[email protected]>
1 parent 1130c28 commit 5a47e9f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

irohad/main/irohad.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ DEFINE_validator(verbosity, validateVerbosity);
9696
std::promise<void> exit_requested;
9797

9898
int main(int argc, char *argv[]) {
99+
// Parsing command line arguments
100+
gflags::ParseCommandLineFlags(&argc, &argv, true);
101+
99102
spdlog::set_level(spdlog::level::level_enum(FLAGS_verbosity));
100103

101104
auto log = logger::log("MAIN");
@@ -111,10 +114,6 @@ int main(int argc, char *argv[]) {
111114

112115
namespace mbr = config_members;
113116

114-
// Parsing command line arguments
115-
gflags::ParseCommandLineFlags(&argc, &argv, true);
116-
gflags::ShutDownCommandLineFlags();
117-
118117
// Reading iroha configuration file
119118
auto config = parse_iroha_config(FLAGS_config);
120119
log->info("config initialized");
@@ -252,5 +251,7 @@ int main(int argc, char *argv[]) {
252251
// They do all necessary work in their destructors
253252
log->info("shutting down...");
254253

254+
gflags::ShutDownCommandLineFlags();
255+
255256
return 0;
256257
}

0 commit comments

Comments
 (0)