mirror of
https://github.com/jkl1337/duplicacy.git
synced 2026-01-03 04:04:45 -06:00
Implemented a global option to suppress logs by ids
You can now use -suppress LOGID or -s LOGID to not print logs with the given ids. This is a global option which means it is applicable to all commands. It can be specified more than once.
This commit is contained in:
@@ -159,6 +159,10 @@ func setGlobalOptions(context *cli.Context) {
|
||||
}()
|
||||
}
|
||||
|
||||
for _, logID := range context.GlobalStringSlice("suppress") {
|
||||
duplicacy.SuppressLog(logID)
|
||||
}
|
||||
|
||||
duplicacy.RunInBackground = context.GlobalBool("background")
|
||||
}
|
||||
|
||||
@@ -2069,6 +2073,11 @@ func main() {
|
||||
Name: "comment",
|
||||
Usage: "add a comment to identify the process",
|
||||
},
|
||||
cli.StringSliceFlag{
|
||||
Name: "suppress, s",
|
||||
Usage: "suppress logs with the specified id",
|
||||
Argument: "<id>",
|
||||
},
|
||||
}
|
||||
|
||||
app.HideVersion = true
|
||||
|
||||
Reference in New Issue
Block a user