aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/silentct-mon/main.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd/silentct-mon/main.go b/cmd/silentct-mon/main.go
index b11600f..cc0ef77 100644
--- a/cmd/silentct-mon/main.go
+++ b/cmd/silentct-mon/main.go
@@ -40,6 +40,7 @@ Options:
-C, --contact A string that helps log operators know who you are,
consider seting this to an email address (Default: "")
-d, --directory Path to a directory where all state will be stored
+ -f, --force Override santity checks that may not be fatal (Default: false)
-w, --num-workers Number of parallel workers to fetch each log with (Default: 1)
-o, --output-file File that all output will be written to (Default: stdout)
-e, --please-exit Toggle to only run until up-to-date (Default: false)
@@ -54,6 +55,7 @@ type config struct {
configFile string
contact string
directory string
+ force bool
pleaseExit bool
outputFile string
pullInterval time.Duration
@@ -71,6 +73,7 @@ func configure(cmd string, args []string) (cfg config, err error) {
flagopt.StringOpt(fs, &cfg.configFile, "configuration", "c", "")
flagopt.StringOpt(fs, &cfg.contact, "contact", "C", "")
flagopt.StringOpt(fs, &cfg.directory, "directory", "d", "")
+ flagopt.BoolOpt(fs, &cfg.force, "force", "f", false)
flagopt.UintOpt(fs, &cfg.numWorkers, "num-workers", "w", 1)
flagopt.StringOpt(fs, &cfg.outputFile, "output-file", "o", "")
flagopt.BoolOpt(fs, &cfg.pleaseExit, "please-exit", "e", false)
@@ -84,7 +87,7 @@ func configure(cmd string, args []string) (cfg config, err error) {
if cfg.directory == "" {
return cfg, fmt.Errorf("directory is a required option")
}
- if cfg.numWorkers == 0 || cfg.numWorkers >= 4 {
+ if (cfg.numWorkers == 0 || cfg.numWorkers >= 4) && !cfg.force {
return cfg, fmt.Errorf("number of workers must be in [1, 4)")
}
output := os.Stdout