logger

package
v1.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package logger provides logging facility.

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Interface

type Interface interface {
	AddFlags(f *pflag.FlagSet)
	Printf(format string, args ...interface{})
	V(level int) Verbose
}

type Logger

type Logger struct{}

Logger provides logging facility using klog.

func (*Logger) AddFlags

func (*Logger) AddFlags(f *pflag.FlagSet)

AddFlags adds the flags such as -v.

func (*Logger) Printf

func (*Logger) Printf(format string, args ...interface{})

Printf writes the message to stderr.

func (*Logger) V

func (*Logger) V(level int) Verbose

V returns a logger enabled only if the level is enabled.

type Verbose

type Verbose interface {
	Infof(format string, args ...interface{})
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL