Fix the nits leftover from #1118 review (#1124)

Fix the stuff that was not fixed.
This commit is contained in:
Victor Agababov 2020-02-24 16:43:08 -08:00 committed by GitHub
parent 60e39237f6
commit 14a424af04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -22,8 +22,8 @@ package logging
import (
"context"
"flag"
"fmt"
"os"
"strconv"
"strings"
"sync"
"time"
@ -121,7 +121,7 @@ func InitializeMetricExporter(context string) {
}
func printFlags() {
flagList := make([]interface{}, 0)
var flagList []interface{}
flag.CommandLine.VisitAll(func(f *flag.Flag) {
flagList = append(flagList, f.Name, f.Value.String())
})
@ -137,7 +137,7 @@ var (
// InitializeLogger initializes logging for Knative tests.
// It should be called prior to executing tests but after command-line flags have been processed.
// Recommend doing it in a TestMain().
// It is recommended doing it in the TestMain() function.
func InitializeLogger() {
loggerInitializeOnce.Do(func() {
humanEncoder := zapcore.NewConsoleEncoder(zap.NewDevelopmentEncoderConfig())
@ -163,7 +163,7 @@ func InitializeLogger() {
// Set klog/glog verbosities (works with and without proxy libraries)
klogLevel := klog.Level(0)
klogLevel.Set(fmt.Sprint(verbosity))
klogLevel.Set(strconv.Itoa(verbosity))
if verbosity > 2 {
printFlags()