camput: fix logging bug

Change-Id: I8781b523013dca814b81f99fed85ba59a489862c
This commit is contained in:
Brad Fitzpatrick 2012-04-20 14:03:09 -07:00
parent 5005dcf751
commit 9168eb84f0
1 changed files with 4 additions and 4 deletions

View File

@ -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...)
}
}