logger

package
v1.0.34 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

README

logger2

对其他 logger 进行封装,目前封装的有: zap

咋个使用,具体看 zap > *_test 文件,特性如下

  • 不使用 sugar

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FormatLogger added in v1.0.34

type FormatLogger interface {
	Debugf(format string, args ...interface{})
	Infof(format string, args ...interface{})
	Warnf(format string, args ...interface{})
	Errorf(format string, args ...interface{})
	Fatalf(format string, args ...interface{})
	Panicf(format string, args ...interface{})
}

FormatLogger 携带format的日志打印

type Logger

type Logger interface {
	StandardLogger
	FormatLogger

	Named(name string) Logger
	With(key string, value interface{}) Logger
}

type StandardLogger added in v1.0.34

type StandardLogger interface {
	Debug(msgs string)
	Info(msgs string)
	Warn(msgs string)
	Error(msgs string)
	Fatal(msgs string)
	Panic(msgs string)
}

StandardLogger 标准的日志打印

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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