Skip to content

Commit

Permalink
Merge pull request #238 from yuzhiquan/fix-nit-for-klog
Browse files Browse the repository at this point in the history
Fix  little nit for klog
  • Loading branch information
k8s-ci-robot committed May 12, 2021
2 parents 4c0ac5a + 6a9ef3f commit 02ca14b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions klog.go
Expand Up @@ -284,6 +284,7 @@ func (m *moduleSpec) Get() interface{} {

var errVmoduleSyntax = errors.New("syntax error: expect comma-separated list of filename=N")

// Set will sets module value
// Syntax: -vmodule=recordio=2,file=1,gfs*=3
func (m *moduleSpec) Set(value string) error {
var filter []modulePat
Expand Down Expand Up @@ -362,6 +363,7 @@ func (t *traceLocation) Get() interface{} {

var errTraceSyntax = errors.New("syntax error: expect file.go:234")

// Set will sets backtrace value
// Syntax: -log_backtrace_at=gopherflakes.go:234
// Note that unlike vmodule the file extension is included here.
func (t *traceLocation) Set(value string) error {
Expand Down
2 changes: 1 addition & 1 deletion klog_test.go
Expand Up @@ -647,7 +647,7 @@ func BenchmarkLogs(b *testing.B) {

testFile, err := ioutil.TempFile("", "test.log")
if err != nil {
b.Error("unable to create temporary file")
b.Fatal("unable to create temporary file")
}
defer os.Remove(testFile.Name())

Expand Down
2 changes: 1 addition & 1 deletion klogr/klogr.go
Expand Up @@ -104,7 +104,7 @@ func framesToCaller() int {
return 1 // something went wrong, this is safe
}

// trimDuplicates will deduplicates elements provided in multiple KV tuple
// trimDuplicates will deduplicate elements provided in multiple KV tuple
// slices, whilst maintaining the distinction between where the items are
// contained.
func trimDuplicates(kvLists ...[]interface{}) [][]interface{} {
Expand Down

0 comments on commit 02ca14b

Please sign in to comment.