mirror of https://github.com/perkeep/perkeep.git
camput: fix logging bug
Change-Id: I8781b523013dca814b81f99fed85ba59a489862c
This commit is contained in:
parent
5005dcf751
commit
9168eb84f0
|
@ -25,16 +25,16 @@ type Logger interface {
|
|||
}
|
||||
|
||||
type flagLogger struct {
|
||||
on *bool
|
||||
flagPtr **bool
|
||||
}
|
||||
|
||||
var flagCacheLog *bool
|
||||
|
||||
var vlog = &flagLogger{flagVerbose}
|
||||
var cachelog = &flagLogger{flagCacheLog}
|
||||
var vlog = &flagLogger{&flagVerbose}
|
||||
var cachelog = &flagLogger{&flagCacheLog}
|
||||
|
||||
func (fl *flagLogger) Printf(format string, args ...interface{}) {
|
||||
if fl.on != nil && *fl.on {
|
||||
if fl.flagPtr != nil && **fl.flagPtr {
|
||||
log.Printf(format, args...)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue