summaryrefslogtreecommitdiffstats
path: root/src/clap.rs
diff options
context:
space:
mode:
authorClement Tsang <34804052+ClementTsang@users.noreply.github.com>2020-09-30 22:06:57 -0400
committerGitHub <noreply@github.com>2020-09-30 22:06:57 -0400
commit9afb6d7c88ca515ecd8d37134b567b6d17e0f0fb (patch)
tree0f5918a7ba31de81d388bc9c1b738423386fe9d8 /src/clap.rs
parent57e87d88d09e6282770a2315977fe43ef52958b4 (diff)
feature: add --debug flag for logging (#259)
Adds a `--debug` flag to aid in debugging issues. This saves to `/tmp/bottom_debug.log`.
Diffstat (limited to 'src/clap.rs')
-rw-r--r--src/clap.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/clap.rs b/src/clap.rs
index accd3fe8..7c2191a8 100644
--- a/src/clap.rs
+++ b/src/clap.rs
@@ -81,6 +81,13 @@ custom layouts.\n\n",
"\
When searching for a process, enables case sensitivity by default.\n\n",
);
+ let debug = Arg::with_name("debug")
+ .long("debug")
+ .help("Enables debug logging.")
+ .long_help(
+ "\
+Enables debug logging to /tmp/bottom_debug.log.",
+ );
let disable_click = Arg::with_name("disable_click")
.long("disable_click")
.help("Disables mouse clicks.")
@@ -305,6 +312,7 @@ The minimum is 1s (1000), and defaults to 15s (15000).\n\n\n",
.arg(battery)
.arg(case_sensitive)
.arg(config_location)
+ .arg(debug)
.arg(default_time_value)
.arg(default_widget_count)
.arg(default_widget_type)