diff options
author | saturneric <[email protected]> | 2023-12-03 20:25:21 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2023-12-03 20:25:21 +0000 |
commit | 054e6e28cca2517dda2319ef683314b3318c39a6 (patch) | |
tree | ae9ff4a9fe280f3640ca249bad45ab250cfd1610 /src/cmd.cpp | |
parent | fix: slove issues in key/subkey generation (diff) | |
download | GpgFrontend-054e6e28cca2517dda2319ef683314b3318c39a6.tar.gz GpgFrontend-054e6e28cca2517dda2319ef683314b3318c39a6.zip |
feat: standarized and speed up app env loading process
Diffstat (limited to 'src/cmd.cpp')
-rw-r--r-- | src/cmd.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/cmd.cpp b/src/cmd.cpp index 66e2604f..24080a08 100644 --- a/src/cmd.cpp +++ b/src/cmd.cpp @@ -36,6 +36,7 @@ // GpgFrontend #include "GpgFrontendBuildInfo.h" +#include "spdlog/common.h" namespace po = boost::program_options; @@ -61,13 +62,19 @@ auto ParseLogLevel(const po::variables_map& vm) -> spdlog::level::level_enum { if (log_level == "trace") { return spdlog::level::trace; - } else if (log_level == "debug") { + } + if (log_level == "debug") { return spdlog::level::debug; - } else if (log_level == "info") { + } + if (log_level == "info") { return spdlog::level::info; - } else if (log_level == "warn") { + } + if (log_level == "warn") { return spdlog::level::warn; - } else if (log_level == "error") { + } + if (log_level == "error") { return spdlog::level::err; } + + return spdlog::level::info; }
\ No newline at end of file |