Documentation ¶
Index ¶
- Variables
- func Enabled() bool
- func Error(err error) zap.Field
- func Flags(fs *pflag.FlagSet)
- func HijackLogrus(logger *logrus.Logger)
- func HijackStandardLogrus()
- func Init() error
- func KubernetesObject(key string, obj runtime.Object) zap.Field
- func NewBufferLogger(w io.Writer) *zap.Logger
- func OutputStderr()
- func OverrideKlog() error
- func SetLogLevel(level string)
- func StackTrace(err error) zap.Field
- func StandardLogger(name string) *log.Logger
- func Verbose(err error) zap.Field
- type NamedWriter
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Log *zap.Logger
)
Functions ¶
func Flags ¶
Flags sets the flag of logger. We can't receive *cli.FlagSet directly due to avoid cycle dependency.
func HijackLogrus ¶
func HijackStandardLogrus ¶
func HijackStandardLogrus()
func OutputStderr ¶
func OutputStderr()
func OverrideKlog ¶
func OverrideKlog() error
func SetLogLevel ¶
func SetLogLevel(level string)
func StackTrace ¶
func StandardLogger ¶
Types ¶
type NamedWriter ¶
type NamedWriter struct {
// contains filtered or unexported fields
}
func NewNamedWriter ¶
func NewNamedWriter(w io.Writer, name string) *NamedWriter
Click to show internal directories.
Click to hide internal directories.