xlog

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 License: Apache-2.0 Imports: 10 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Reset = string([]byte{27, 91, 48, 109})
	// 标准
	White   = string([]byte{27, 91, 51, 48, 109}) // 白色
	Red     = string([]byte{27, 91, 51, 49, 109}) // 红色
	Green   = string([]byte{27, 91, 51, 50, 109}) // 绿色
	Yellow  = string([]byte{27, 91, 51, 51, 109}) // 黄色
	Blue    = string([]byte{27, 91, 51, 52, 109}) // 蓝色
	Magenta = string([]byte{27, 91, 51, 53, 109}) // 紫色
	Cyan    = string([]byte{27, 91, 51, 54, 109}) // 青色
	// 高亮
	WhiteBright   = string([]byte{27, 91, 49, 59, 51, 48, 109})
	RedBright     = string([]byte{27, 91, 49, 59, 51, 49, 109})
	GreenBright   = string([]byte{27, 91, 49, 59, 51, 50, 109})
	YellowBright  = string([]byte{27, 91, 49, 59, 51, 51, 109})
	BlueBright    = string([]byte{27, 91, 49, 59, 51, 52, 109})
	MagentaBright = string([]byte{27, 91, 49, 59, 51, 53, 109})
	CyanBright    = string([]byte{27, 91, 49, 59, 51, 54, 109})
	// 斜体
	WhiteBevel   = string([]byte{27, 91, 51, 59, 51, 48, 109})
	RedBevel     = string([]byte{27, 91, 51, 59, 51, 49, 109})
	GreenBevel   = string([]byte{27, 91, 51, 59, 51, 50, 109})
	YellowBevel  = string([]byte{27, 91, 51, 59, 51, 51, 109})
	BlueBevel    = string([]byte{27, 91, 51, 59, 51, 52, 109})
	MagentaBevel = string([]byte{27, 91, 51, 59, 51, 53, 109})
	CyanBevel    = string([]byte{27, 91, 51, 59, 51, 54, 109})
	// 下划线
	WhiteUnderLine   = string([]byte{27, 91, 52, 59, 51, 48, 109})
	RedUnderLine     = string([]byte{27, 91, 52, 59, 51, 49, 109})
	GreenUnderLine   = string([]byte{27, 91, 52, 59, 51, 50, 109})
	YellowUnderLine  = string([]byte{27, 91, 52, 59, 51, 51, 109})
	BlueUnderLine    = string([]byte{27, 91, 52, 59, 51, 52, 109})
	MagentaUnderLine = string([]byte{27, 91, 52, 59, 51, 53, 109})
	CyanUnderLine    = string([]byte{27, 91, 52, 59, 51, 54, 109})
	// 背景色
	WhiteBg   = string([]byte{27, 91, 55, 59, 51, 48, 109})
	RedBg     = string([]byte{27, 91, 55, 59, 51, 49, 109})
	GreenBg   = string([]byte{27, 91, 55, 59, 51, 50, 109})
	YellowBg  = string([]byte{27, 91, 55, 59, 51, 51, 109})
	BlueBg    = string([]byte{27, 91, 55, 59, 51, 52, 109})
	MagentaBg = string([]byte{27, 91, 55, 59, 51, 53, 109})
	CyanBg    = string([]byte{27, 91, 55, 59, 51, 54, 109})
	// 删除线
	WhiteDelLine   = string([]byte{27, 91, 57, 59, 51, 48, 109})
	RedDelLine     = string([]byte{27, 91, 57, 59, 51, 49, 109})
	GreenDelLine   = string([]byte{27, 91, 57, 59, 51, 50, 109})
	YellowDelLine  = string([]byte{27, 91, 57, 59, 51, 51, 109})
	BlueDelLine    = string([]byte{27, 91, 57, 59, 51, 52, 109})
	MagentaDelLine = string([]byte{27, 91, 57, 59, 51, 53, 109})
	CyanDelLine    = string([]byte{27, 91, 57, 59, 51, 54, 109})
)

Functions

func Debug

func Debug(args ...interface{})

func Debugf

func Debugf(format string, args ...interface{})

func Error

func Error(args ...interface{})

func Errorf

func Errorf(format string, args ...interface{})

func Info

func Info(args ...interface{})

func Infof

func Infof(format string, args ...interface{})

func Warn

func Warn(args ...interface{})

func Warnf

func Warnf(format string, args ...interface{})

Types

type DebugLogger

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

type ErrorLogger

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

type InfoLogger

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

type Logger added in v1.0.2

type Logger struct {
	Logger *zap.Logger
	Sugar  *zap.SugaredLogger
	// contains filtered or unexported fields
}

func Zap

func Zap() *Logger

func (*Logger) Debug added in v1.0.7

func (l *Logger) Debug(args ...interface{})

func (*Logger) Debugf added in v1.0.7

func (l *Logger) Debugf(format string, args ...interface{})

func (*Logger) Error added in v1.0.7

func (l *Logger) Error(args ...interface{})

func (*Logger) Errorf added in v1.0.7

func (l *Logger) Errorf(format string, args ...interface{})

func (*Logger) Info added in v1.0.7

func (l *Logger) Info(args ...interface{})

func (*Logger) Infof added in v1.0.7

func (l *Logger) Infof(format string, args ...interface{})

func (*Logger) Warn added in v1.0.7

func (l *Logger) Warn(args ...interface{})

func (*Logger) Warnf added in v1.0.7

func (l *Logger) Warnf(format string, args ...interface{})

type WarnLogger

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

Jump to

Keyboard shortcuts

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