logrus

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package logrus implements a github.com/virtual-kubelet/virtual-kubelet/log.Logger using Logrus as a backend You can use this by creating a logrus logger and calling `FromLogrus(entry)`. If you want this to be the default logger for virtual-kubelet, set `log.L` to the value returned by `FromLogrus`

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromLogrus

func FromLogrus(entry *logrus.Entry) log.Logger

FromLogrus creates a new `log.Logger` from the provided entry

Types

type Adapter

type Adapter struct {
	*logrus.Entry
}

Adapter implements the `log.Logger` interface for logrus

func (*Adapter) WithError

func (l *Adapter) WithError(err error) log.Logger

WithError adds an error to the log entry

func (*Adapter) WithField

func (l *Adapter) WithField(key string, val interface{}) log.Logger

WithField adds a field to the log entry.

func (*Adapter) WithFields

func (l *Adapter) WithFields(f log.Fields) log.Logger

WithFields adds multiple fields to a log entry.

Jump to

Keyboard shortcuts

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