File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package cmd
33import (
44 "context"
55 "fmt"
6+ "log"
67 "os"
78 "path/filepath"
89 "strings"
@@ -26,6 +27,8 @@ var stageDescriptions = map[string]string{
2627
2728func runAnalysis (apkPath string , config * CLIConfig ) error {
2829
30+ configureLogging (config .Verbose )
31+
2932 cliCfg := & analyzer.Config {
3033 DisableNetworkChecks : ! config .EnableNetworkAndDNS ,
3134 }
@@ -94,6 +97,16 @@ func displayVerboseProgress(evt analyzer.ProgressEvent) {
9497 }
9598}
9699
100+ func configureLogging (verbose bool ) {
101+ log .SetOutput (os .Stderr )
102+ if verbose {
103+ log .SetFlags (log .LstdFlags )
104+ return
105+ }
106+ // Friendly, timestamp-free logs for normal mode
107+ log .SetFlags (0 )
108+ }
109+
97110func displaySimpleProgress (evt analyzer.ProgressEvent , lastStage * string , lastPercent * int ) {
98111
99112 if evt .Stage != * lastStage {
You can’t perform that action at this time.
0 commit comments