From 89ae6ea612244e2e0265d10a0794629b94165866 Mon Sep 17 00:00:00 2001 From: shoopea Date: Thu, 29 Jun 2023 23:46:53 +0200 Subject: [PATCH] add quiet flag --- backup.go | 4 ++++ version.go | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/backup.go b/backup.go index 53316b4..34fae3d 100644 --- a/backup.go +++ b/backup.go @@ -13,6 +13,7 @@ var ( cfgFile = flag.String("config", "config.json", "config file") isDaemon = flag.Bool("daemon", false, "run as daemon") debug = flag.Bool("debug", false, "log debug messages") + quiet = flag.Bool("quiet", false, "remove most log messages") logFile = flag.String("logfile", "", "log file") cfg Config email *Email @@ -26,6 +27,9 @@ func main() { if *debug { log.SetLevel(log.DebugLevel) } + if *quiet { + log.SetLevel(log.WarnLevel) + } if *logFile != "" { if f, err := os.OpenFile(*logFile, os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0644); err != nil { log.Printf("Cannot open logfile (%s)", err) diff --git a/version.go b/version.go index 0b12668..6fbebf4 100644 --- a/version.go +++ b/version.go @@ -1,7 +1,7 @@ // Code generated by version.sh (@generated) DO NOT EDIT. package main -var githash = "0e0e5db" +var githash = "f94f9b9" var branch = "v2" -var buildstamp = "2023-06-29_21:36:34" -var commits = "59" -var version = "0e0e5db-b59 - 2023-06-29_21:36:34" +var buildstamp = "2023-06-29_21:46:39" +var commits = "60" +var version = "f94f9b9-b60 - 2023-06-29_21:46:39"