Get rid of the --log-level option
This option was misleading, because it seems that it sets the default
log level for all of the other loggers, but it doesn't. The other
loggers have their own defaults and these would always override
--log-level. However, it does change the log level of the `main` logger.
Change-Id: I6ba6284acda30bb680fab8d0ca912a9fd956eacd
diff --git a/src/main-hardware.cpp b/src/main-hardware.cpp
index e357119..63d0200 100644
--- a/src/main-hardware.cpp
+++ b/src/main-hardware.cpp
@@ -18,7 +18,6 @@
Usage:
veliad-hardware
[--appliance=<Model>]
- [--log-level=<Level>]
[--sysrepo-log-level=<Level>]
[--hardware-log-level=<Level>]
veliad-hardware (-h | --help)
@@ -28,11 +27,10 @@
-h --help Show this screen.
--version Show version.
--appliance=<Model> Initialize IETF Hardware and outputs for specific appliance.
- --log-level=<N> Log level for everything [default: 3]
- (0 -> critical, 1 -> error, 2 -> warning, 3 -> info,
- 4 -> debug, 5 -> trace)
--sysrepo-log-level=<N> Log level for the sysrepo library [default: 3]
--hardware-log-level=<N> Log level for the hardware drivers [default: 3]
+ (0 -> critical, 1 -> error, 2 -> warning, 3 -> info,
+ 4 -> debug, 5 -> trace)
)";
int main(int argc, char* argv[])
@@ -50,7 +48,6 @@
spdlog::set_level(spdlog::level::info);
try {
- spdlog::set_level(parseLogLevel("Generic", args["--log-level"]));
spdlog::get("sysrepo")->set_level(parseLogLevel("Sysrepo library", args["--sysrepo-log-level"]));
spdlog::get("hardware")->set_level(parseLogLevel("Hardware loggers", args["--hardware-log-level"]));