Documentation ¶
Overview ¶
Package log provides a global interface to logging functionality
Index ¶
- func Debugf(ctx context.Context, format string, args ...interface{})
- func Errorf(ctx context.Context, format string, args ...interface{})
- func Fatalf(ctx context.Context, format string, args ...interface{})
- func Infof(ctx context.Context, format string, args ...interface{})
- func InitKlogShim()
- func RemoveHook(logger *logrus.Logger, name string)
- func StartSpan(ctx context.Context) (context.Context, trace.Span)
- func Warnf(ctx context.Context, format string, args ...interface{})
- func WithFields(ctx context.Context, fields map[string]interface{}) *logrus.Entry
- type FileNameHook
- type FilterHook
- type ID
- type Name
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitKlogShim ¶ added in v1.22.0
func InitKlogShim()
InitKlogShim creates a shim between logrus and klog by forwarding klog messages to the logrus logger. To reduce the overall verbosity we log every Info klog message in logrus Debug verbosity.
func RemoveHook ¶
Types ¶
type FileNameHook ¶
type FileNameHook struct { Formatter func(file, function string, line int) string // contains filtered or unexported fields }
func NewFilenameHook ¶
func NewFilenameHook() *FileNameHook
NewFilenameHook creates a new default FileNameHook
func (*FileNameHook) Fire ¶
func (f *FileNameHook) Fire(entry *logrus.Entry) error
Fire executes the hook for every logrus entry
func (*FileNameHook) Levels ¶
func (f *FileNameHook) Levels() []logrus.Level
Levels returns the levels for which the hook is activated. This contains currently only the DebugLevel
type FilterHook ¶
type FilterHook struct {
// contains filtered or unexported fields
}
func NewFilterHook ¶
func NewFilterHook(filter string) (*FilterHook, error)
NewFilterHook creates a new default FilterHook
func (*FilterHook) Fire ¶
func (f *FilterHook) Fire(entry *logrus.Entry) error
Fire executes the hook for every logrus entry
func (*FilterHook) Levels ¶
func (f *FilterHook) Levels() []logrus.Level
Levels returns the levels for which the hook is activated. This contains currently only the DebugLevel