From 9168eb84f0804ce1cb5f3d72b7db7c991cc1dc9d Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Fri, 20 Apr 2012 14:03:09 -0700 Subject: [PATCH] camput: fix logging bug Change-Id: I8781b523013dca814b81f99fed85ba59a489862c --- cmd/camput/logging.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/camput/logging.go b/cmd/camput/logging.go index 365987fc1..a4456cc16 100644 --- a/cmd/camput/logging.go +++ b/cmd/camput/logging.go @@ -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...) } }