log

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v1.0.0

type Config struct {
	// 日志路径
	Path string

	// 是否开启debug,开启后会显示debug信息
	Debug bool
}

type Context

type Context map[string]interface{}

type Logger

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

Logger

func New

func New(conf *Config) *Logger

getInstance init logger instance

func (*Logger) Debug

func (logger *Logger) Debug(message string, ctx Context)

Debug

func (*Logger) Error

func (logger *Logger) Error(message string, ctx Context)

Error

func (*Logger) Info

func (logger *Logger) Info(message string, ctx Context)

Info

func (*Logger) SetFields added in v1.0.0

func (logger *Logger) SetFields(fields map[string]interface{})

Jump to

Keyboard shortcuts

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