Skip to content

Commit

Permalink
add trace flag
Browse files Browse the repository at this point in the history
  • Loading branch information
oxpa committed Sep 5, 2024
1 parent bd444ab commit 855b68b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion experimental/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ var (
jobs = flag.Int("jobs", 10, "Number of concurrent jobs to execute")
parallelWalkJobs = flag.Int("parallel-walk-jobs", 10, "Number of concurrent parallel walk jobs to execute")

trace = flag.Bool("trace", false, "Print trace messages")
debug = flag.Bool("debug", false, "Print debug messages")
verbose = flag.Bool("verbose", true, "Print verbose messages")
softErrors = flag.Bool("soft-errors", false, "Print errors, but do not fail")
Expand Down Expand Up @@ -47,7 +48,9 @@ func logErrorln(args ...interface{}) {
func Main() {
flag.Parse()

if *debug {
if *trace {
logrus.SetLevel(logrus.TraceLevel)
} else if *debug {
logrus.SetLevel(logrus.DebugLevel)
} else if *verbose {
logrus.SetLevel(logrus.InfoLevel)
Expand Down

0 comments on commit 855b68b

Please sign in to comment.