go-micro: github.com/micro/go-micro/util/log Index | Files

package log

import "github.com/micro/go-micro/util/log"

Package log is a global internal logger

Index

Package Files

log.go

func Debug Uses

func Debug(v ...interface{})

Debug provides debug level logging

func Debugf Uses

func Debugf(format string, v ...interface{})

Debugf provides debug level logging

func Error Uses

func Error(v ...interface{})

Error provides warn level logging

func Errorf Uses

func Errorf(format string, v ...interface{})

Errorf provides warn level logging

func Fatal Uses

func Fatal(v ...interface{})

Fatal logs with Log and then exits with os.Exit(1)

func Fatalf Uses

func Fatalf(format string, v ...interface{})

Fatalf logs with Logf and then exits with os.Exit(1)

func GetLogger Uses

func GetLogger() log.Log

GetLogger returns the local logger

func Info Uses

func Info(v ...interface{})

Info provides info level logging

func Infof Uses

func Infof(format string, v ...interface{})

Infof provides info level logging

func Log Uses

func Log(v ...interface{})

Log makes use of github.com/micro/debug/log

func Logf Uses

func Logf(format string, v ...interface{})

Logf makes use of github.com/micro/debug/log

func Name Uses

func Name(name string)

Set service name

func SetLevel Uses

func SetLevel(l Level)

SetLevel sets the log level

func SetLogger Uses

func SetLogger(l log.Log)

SetLogger sets the local logger

func SetPrefix Uses

func SetPrefix(p string)

Set a prefix for the logger

func Trace Uses

func Trace(v ...interface{})

Trace provides trace level logging

func Tracef Uses

func Tracef(format string, v ...interface{})

Tracef provides trace level logging

func Warn Uses

func Warn(v ...interface{})

Warn provides warn level logging

func Warnf Uses

func Warnf(format string, v ...interface{})

Warnf provides warn level logging

func WithLevel Uses

func WithLevel(l Level, v ...interface{})

WithLevel logs with the level specified

func WithLevelf Uses

func WithLevelf(l Level, format string, v ...interface{})

WithLevel logs with the level specified

type Level Uses

type Level int32

level is a log level

const (
    LevelFatal Level = iota
    LevelError
    LevelWarn
    LevelInfo
    LevelDebug
    LevelTrace
)

func GetLevel Uses

func GetLevel() Level

GetLevel returns the current level

func (Level) String Uses

func (l Level) String() string

Package log imports 5 packages (graph) and is imported by 320 packages. Updated 2020-02-07. Refresh now. Tools for package owners.