logs

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogger

func NewLogger(writer io.StringWriter, logLevel LogLevel) *defaultLogger

NewLogger init Logger instance

Types

type LogLevel

type LogLevel int

LogLevel log level

const (
	//Debug enable debug or above log output
	Debug LogLevel = 0
	//Info enable info or above log output
	Info LogLevel = 1
	//Warn enable warn or above log output
	Warn LogLevel = 2
	//Error enable error or above log output
	Error LogLevel = 3
)

func (LogLevel) String

func (ll LogLevel) String() string

type Logger

type Logger interface {
	Debug(ctx context.Context, msg string, args ...interface{})
	Info(ctx context.Context, msg string, args ...interface{})
	Warn(ctx context.Context, msg string, args ...interface{})
	Error(ctx context.Context, msg string, args ...interface{})
}

Logger logger interface

Jump to

Keyboard shortcuts

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