mylog

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LevelFatal Level = -2
	LevelError       = iota
	LevelInfo
	LevelTrace
	LevelDebug
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Level

type Level int

type Logger

type Logger interface {
	Printf(string, ...interface{})
}

type MyLog

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

func NewLog

func NewLog(lvl string, logger Logger) (*MyLog, error)

NewLog return a MyLog structure

func (*MyLog) Debug

func (l *MyLog) Debug() logcontext

Debug prepare the output of DEBUG message

func (*MyLog) Error

func (l *MyLog) Error() logcontext

Error prepare the output of ERROR message

func (*MyLog) Fatal

func (l *MyLog) Fatal() logcontext

Fatal prepare the output of FATAL message

func (*MyLog) Info

func (l *MyLog) Info() logcontext

Info prepare the output of INFO message

func (*MyLog) IsDebug

func (l *MyLog) IsDebug() bool

IsDebug return true if log level is DEBUG

func (*MyLog) Trace

func (l *MyLog) Trace() logcontext

Trace prepare the output of TRACE message

Jump to

Keyboard shortcuts

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