@@ -45,6 +45,7 @@ const (
45
45
var (
46
46
ConfigPath string
47
47
Jobs int
48
+ Verbosity int
48
49
DumpSystemd bool
49
50
DumpConfig bool
50
51
ShowVersion bool
53
54
PrefetchForeground bool // Standalone prefetch, prefetch and exit
54
55
AllowNonImage bool
55
56
Config = NewWebPConfig ()
56
- Version = "0.13.0 "
57
+ Version = "0.13.1 "
57
58
WriteLock = cache .New (5 * time .Minute , 10 * time .Minute )
58
59
ConvertLock = cache .New (5 * time .Minute , 10 * time .Minute )
59
60
LocalHostAlias = "local"
@@ -144,6 +145,12 @@ func init() {
144
145
flag .BoolVar (& Prefetch , "prefetch" , false , "Prefetch and convert images to optimized format, with WebP Server Go launch normally" )
145
146
flag .BoolVar (& PrefetchForeground , "prefetch-foreground" , false , "Prefetch and convert image to optimized format in foreground, prefetch and exit" )
146
147
flag .IntVar (& Jobs , "jobs" , runtime .NumCPU (), "Prefetch thread, default is all." )
148
+ // 0 = silent (no log messages)
149
+ // 1 = error (error messages only)
150
+ // 2 = warn (error messages and warnings only)
151
+ // 3 = info (error messages, warnings and normal activity logs)
152
+ // 4 = debug (all info plus additional messages for debugging)
153
+ flag .IntVar (& Verbosity , "verbosity" , 3 , "Log level(0: silent, 1: error, 2: warn, 3:info, 4: debug), default to 3: info" )
147
154
flag .BoolVar (& DumpConfig , "dump-config" , false , "Print sample config.json." )
148
155
flag .BoolVar (& ShowVersion , "V" , false , "Show version information." )
149
156
}
0 commit comments