summaryrefslogtreecommitdiffstats
path: root/main.cpp
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2019-05-08 15:02:55 -0700
committerPatrick Venture <venture@google.com>2019-05-08 15:13:06 -0700
commit89002dbdd13eb4fa7f35f2db7566291f720fd885 (patch)
treea4a42a525f93d0de2d99e0a50dccb3b4f36e555d /main.cpp
parentde79ee05abd7e1b29b3074b0150b5f4eabf7cf9e (diff)
downloadphosphor-pid-control-89002dbdd13eb4fa7f35f2db7566291f720fd885.tar.gz
phosphor-pid-control-89002dbdd13eb4fa7f35f2db7566291f720fd885.zip
explicitly expect a directory for logging
Verify the logging parameter is explicitly a directory. Treat the path as a directory for creating the logging files. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I84d6be79780df3f52deeb1ff1b7a50de6175c055
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/main.cpp b/main.cpp
index 3726f50..8c99154 100644
--- a/main.cpp
+++ b/main.cpp
@@ -72,7 +72,8 @@ int main(int argc, char* argv[])
"Optional parameter to specify configuration at run-time")
->check(CLI::ExistingFile);
app.add_option("-l,--log", loggingPath,
- "Optional parameter to specify logging path");
+ "Optional parameter to specify logging folder")
+ ->check(CLI::ExistingDirectory);
app.add_flag("-t,--tuning", tuningEnabled, "Enable or disable tuning");
loggingEnabled = (!loggingPath.empty());
OpenPOWER on IntegriCloud