logger

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2021 License: MIT Imports: 7 Imported by: 3

README

logger

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(f interface{}, v ...interface{})

func Format

func Format(f interface{}, v ...interface{}) string

func Info

func Info(f interface{}, v ...interface{})

func SetMode

func SetMode(mode LogMode)

func Warn

func Warn(f interface{}, v ...interface{})

Types

type ColorType

type ColorType int
const (
	ColorBlack ColorType
	ColorRed
	ColorGreen
	ColorYellow
	ColorBlue
	ColorPurple
	ColorCyan
	ColorWhite
)

type LogMode

type LogMode uint
const (
	Silent LogMode = iota + 1
	Normal
	Warning
	Debug
)

type Logger

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

func NewLogger

func NewLogger(args ...interface{}) *Logger

func NewLoggerWithSourceDir

func NewLoggerWithSourceDir(sourceDir string, args ...interface{}) *Logger

func (Logger) Error

func (l Logger) Error(f interface{}, v ...interface{})

func (Logger) Info

func (l Logger) Info(f interface{}, v ...interface{})

Info 普通日志打印

func (Logger) Level

func (l Logger) Level() uint

func (Logger) Warn

func (l Logger) Warn(f interface{}, v ...interface{})

Jump to

Keyboard shortcuts

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