virtual-kubelet: github.com/virtual-kubelet/virtual-kubelet/log/logrus Index | Files

package logrus

import "github.com/virtual-kubelet/virtual-kubelet/log/logrus"

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

Package Files

logrus.go

func FromLogrus Uses

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

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

type Adapter Uses

type Adapter struct {
    *logrus.Entry
}

Adapter implements the `log.Logger` interface for logrus

func (*Adapter) WithError Uses

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

WithError adds an error to the log entry

func (*Adapter) WithField Uses

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

WithField adds a field to the log entry.

func (*Adapter) WithFields Uses

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

WithFields adds multiple fields to a log entry.

Package logrus imports 2 packages (graph) and is imported by 2 packages. Updated 2019-06-18. Refresh now. Tools for package owners.