log

package
v0.0.0-...-d22e7c3 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(args ...interface{})

Debug function

func Debugf

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

Debugf function

func Debugw

func Debugw(msg string, keyValues logger.KV)

Debugw function

func Error

func Error(args ...interface{})

Error function

func Errorf

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

Errorf function

func Errorw

func Errorw(msg string, keyValues logger.KV)

Errorw function

func Fatal

func Fatal(args ...interface{})

Fatal function

func Fatalf

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

Fatalf function

func Fatalw

func Fatalw(msg string, keyValues logger.KV)

Fatalw function

func Info

func Info(args ...interface{})

Info function

func Infof

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

Infof function

func Infow

func Infow(msg string, keyValues logger.KV)

Infow function

func Print

func Print(v ...interface{})

Print function

func Printf

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

Printf function

func Println

func Println(v ...interface{})

Println function

func SetConfig

func SetConfig(config *logger.Config) error

SetConfig to the current logger

func SetLevel

func SetLevel(level logger.Level)

SetLevel of log

func SetLevelString

func SetLevelString(level string)

SetLevelString to set log level using string

func SetLogger

func SetLogger(backend logger.Logger)

SetLogger to set default logger backend

func Warn

func Warn(args ...interface{})

Warn function

func Warnf

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

Warnf function

func Warnw

func Warnw(msg string, keyValues logger.KV)

Warnw function

Types

type Config

type Config struct {
	Level string
	// LogFile for log to file
	// this is not needed by default
	// application is expected to run in containerized environment
	LogFile    string
	DebugFile  string
	TimeFormat string
	// set true to log line numbers
	// make sure you understand the overhead when use this
	Caller bool
	// set true to colorize log, only work in console
	UseColor bool
	// use json format
	UseJSON bool
}

Config of log

Directories

Path Synopsis
std
zap

Jump to

Keyboard shortcuts

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