From 957ce0193fa9cf25f3a09410bb64fa6436c37c06 Mon Sep 17 00:00:00 2001 From: Mavo Date: Thu, 4 Feb 2016 14:00:39 +0100 Subject: [PATCH] Set log level from commandline Former-commit-id: b86a4d4e35b49bdd56f798201f04b04ed75e9a49 --- src/storm-dyftee.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/storm-dyftee.cpp b/src/storm-dyftee.cpp index c187e5057..fc113e438 100644 --- a/src/storm-dyftee.cpp +++ b/src/storm-dyftee.cpp @@ -52,19 +52,23 @@ int main(int argc, char** argv) { // Parse cli arguments bool parametric = false; + log4cplus::LogLevel level = log4cplus::WARN_LOG_LEVEL; std::string filename = argv[1]; std::string pctlFormula = "Pmax=?[true U \"failed\"]"; for (int i = 2; i < argc; ++i) { std::string option = argv[i]; if (option == "--parametric") { parametric = true; + } else if (option == "--trace") { + level = log4cplus::TRACE_LOG_LEVEL; + } else if (option == "--debug") { + level = log4cplus::DEBUG_LOG_LEVEL; } else { pctlFormula = option; } } storm::utility::setUp(); - log4cplus::LogLevel level = log4cplus::WARN_LOG_LEVEL; logger.setLogLevel(level); logger.getAppender("mainConsoleAppender")->setThreshold(level);