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

Commit

Permalink
Fix verbosity flag (#1942)
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei Lebedev <[email protected]>
  • Loading branch information
lebdron authored Dec 12, 2018
1 parent 1130c28 commit 5a47e9f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions irohad/main/irohad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ DEFINE_validator(verbosity, validateVerbosity);
std::promise<void> exit_requested;

int main(int argc, char *argv[]) {
// Parsing command line arguments
gflags::ParseCommandLineFlags(&argc, &argv, true);

spdlog::set_level(spdlog::level::level_enum(FLAGS_verbosity));

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

namespace mbr = config_members;

// Parsing command line arguments
gflags::ParseCommandLineFlags(&argc, &argv, true);
gflags::ShutDownCommandLineFlags();

// Reading iroha configuration file
auto config = parse_iroha_config(FLAGS_config);
log->info("config initialized");
Expand Down Expand Up @@ -252,5 +251,7 @@ int main(int argc, char *argv[]) {
// They do all necessary work in their destructors
log->info("shutting down...");

gflags::ShutDownCommandLineFlags();

return 0;
}

0 comments on commit 5a47e9f

Please sign in to comment.