Skip to content

Commit

Permalink
rename klogtologrus to klogtolog
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Okhlopkov <pavel.okhlopkov@flant.com>
  • Loading branch information
Pavel Okhlopkov committed Nov 2, 2024
1 parent 8e5aa59 commit 02e0839
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"k8s.io/client-go/tools/clientcmd"
"k8s.io/client-go/tools/metrics"

_ "github.com/flant/kube-client/klogtologrus" // route klog messages from client-go to logrus
_ "github.com/flant/kube-client/klogtolog" // route klog messages from client-go to logrus
)

const (
Expand Down
6 changes: 3 additions & 3 deletions klogtologrus/adapter.go → klogtolog/adapter.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Package klogtologrus overrides output writer for klog to log messages with logrus.
// Package klogtolog overrides output writer for klog to log messages with logrus.
//
// Usage:
//
// import (
// _ "github.com/flant/kube-client/klogtologrus"
// _ "github.com/flant/kube-client/klogtolog"
// )
package klogtologrus
package klogtolog

import (
"flag"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gbytes"

"github.com/flant/kube-client/klogtologrus"
"github.com/flant/kube-client/klogtologrus/test/service"
klogtolog "github.com/flant/kube-client/klogtolog"
"github.com/flant/kube-client/klogtolog/test/service"
)

// Test that adapter is working through default import in another package
Expand All @@ -25,7 +25,7 @@ func Test_adapter_catches_klog_WarnInfoError(t *testing.T) {

logger := log.NewLogger(log.Options{})
logger.SetOutput(buf)
klogtologrus.InitAdapter(false, logger)
klogtolog.InitAdapter(false, logger)

tests := []struct {
level string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package service
import (
log "github.com/deckhouse/deckhouse/pkg/log"

_ "github.com/flant/kube-client/klogtologrus" // plug in JSON logs adapter
klog_powered_lib "github.com/flant/kube-client/klogtologrus/test/klog-powered-lib"
_ "github.com/flant/kube-client/klogtolog" // plug in JSON logs adapter
klog_powered_lib "github.com/flant/kube-client/klogtolog/test/klog-powered-lib"
)

func DoWithCallToKlogPoweredLib() {
Expand Down

0 comments on commit 02e0839

Please sign in to comment.