krakend: github.com/devopsfaith/krakend/logging Index | Files

package logging

import "github.com/devopsfaith/krakend/logging"

Package logging provides a simple logger interface

Index

Package Files

log.go

Constants

const (
    // LEVEL_DEBUG = 0
    LEVEL_DEBUG = iota
    // LEVEL_INFO = 1
    LEVEL_INFO
    // LEVEL_WARNING = 2
    LEVEL_WARNING
    // LEVEL_ERROR = 3
    LEVEL_ERROR
    // LEVEL_CRITICAL = 4
    LEVEL_CRITICAL
)

Variables

var (
    // ErrInvalidLogLevel is used when an invalid log level has been used.
    ErrInvalidLogLevel = fmt.Errorf("invalid log level")

    // NoOp is the NO-OP logger
    NoOp, _ = NewLogger("CRITICAL", ioutil.Discard, "")
)

type Logger Uses

type Logger interface {
    Debug(v ...interface{})
    Info(v ...interface{})
    Warning(v ...interface{})
    Error(v ...interface{})
    Critical(v ...interface{})
    Fatal(v ...interface{})
}

Logger collects logging information at several levels

func NewLogger Uses

func NewLogger(level string, out io.Writer, prefix string) (Logger, error)

NewLogger creates and returns a Logger object

Package logging imports 6 packages (graph) and is imported by 88 packages. Updated 2019-02-04. Refresh now. Tools for package owners.