Back to godoc.org

Package log

v0.0.0-...-4cd9d19
Latest Go to latest

The latest major version is .

Published: Jan 16, 2020 | License: Apache-2.0 | Module: gitee.com/liwei1dao/lego

Index

func Debug

func Debug(msg string, fields ...Field)

func Debugf

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

func Error

func Error(msg string, fields ...Field)

func Errorf

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

func Fatal

func Fatal(msg string, fields ...Field)

func Fatalf

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

func FieldTozapField

func FieldTozapField(fields ...Field) (fds []zap.Field)

func Info

func Info(msg string, fields ...Field)

func Infof

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

func OnInit

func OnInit(s core.IService, opt ...Option) (err error)

func Panic

func Panic(msg string, fields ...Field)

func Panicf

func Panicf(format string, a ...interface{})

func Warn

func Warn(msg string, fields ...Field)

func Warnf

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

type Field

type Field struct {
	Key   string
	Value interface{}
}

type Ilog

type Ilog interface {
	Debug(msg string, fields ...Field)
	Info(msg string, fields ...Field)
	Warn(msg string, fields ...Field)
	Error(msg string, fields ...Field)
	Panic(msg string, fields ...Field)
	Fatal(msg string, fields ...Field)
	Debugf(format string, a ...interface{})
	Infof(format string, a ...interface{})
	Warnf(format string, a ...interface{})
	Errorf(format string, a ...interface{})
	Panicf(format string, a ...interface{})
	Fatalf(format string, a ...interface{})
}

func NewILog

func NewILog(opt ...Option) (log Ilog, err error)

type LogStrut

type LogStrut interface {
	ToString() (str string)
}

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func (*Logger) Debug

func (this *Logger) Debug(msg string, fields ...Field)

func (*Logger) Debugf

func (this *Logger) Debugf(format string, a ...interface{})

func (*Logger) Error

func (this *Logger) Error(msg string, fields ...Field)

func (*Logger) Errorf

func (this *Logger) Errorf(format string, a ...interface{})

func (*Logger) Fatal

func (this *Logger) Fatal(msg string, fields ...Field)

func (*Logger) Fatalf

func (this *Logger) Fatalf(format string, a ...interface{})

func (*Logger) Info

func (this *Logger) Info(msg string, fields ...Field)

func (*Logger) Infof

func (this *Logger) Infof(format string, a ...interface{})

func (*Logger) Panic

func (this *Logger) Panic(msg string, fields ...Field)

func (*Logger) Panicf

func (this *Logger) Panicf(format string, a ...interface{})

func (*Logger) Warn

func (this *Logger) Warn(msg string, fields ...Field)

func (*Logger) Warnf

func (this *Logger) Warnf(format string, a ...interface{})

type Loglevel

type Loglevel int8
const (
	DebugLevel Loglevel = iota
	InfoLevel
	WarnLevel
	ErrorLevel
	PanicLevel
	FatalLevel
)

type Option

type Option func(*Options)

func SetDebugMode

func SetDebugMode(v bool) Option

func SetFileName

func SetFileName(v string) Option

func SetLoglayer

func SetLoglayer(v int) Option

func SetLoglevel

func SetLoglevel(v Loglevel) Option

type Options

type Options struct {
	// contains filtered or unexported fields
}

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier