log

package
v0.0.0-...-3c93513 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(v ...interface{})

func ErrorCaller

func ErrorCaller(format string, v ...interface{})

func Errorf

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

func GetInfoCallerOutput

func GetInfoCallerOutput(color string, skip int, format string, v ...interface{}) string

func Info

func Info(format string, v ...interface{})

func InfoCaller

func InfoCaller(format string, v ...interface{})

func Infof

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

func InfofCaller

func InfofCaller(format string, v ...interface{})

func InfofCallerPage

func InfofCallerPage(format string, v ...interface{})

func SetLogger

func SetLogger(logger *LogFacer)

func SetLoggerLevel

func SetLoggerLevel(level LogLevel)

Types

type LogFacer

type LogFacer interface {
	//LogMode(LogLevel) LogFacer
	Info(format string, v ...interface{})
	Warn(format string, v ...interface{})
	Error(format string, v ...interface{})
}

Interface logger interface

type LogLevel

type LogLevel int

LogLevel log level

const (
	SilentL LogLevel = iota + 1
	ErrorL
	WarnL
	InfoL
)

type Logger

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

func (*Logger) Error

func (l *Logger) Error(format string, v ...interface{})

func (*Logger) Info

func (l *Logger) Info(format string, v ...interface{})

func (*Logger) Warn

func (l *Logger) Warn(format string, v ...interface{})

Jump to

Keyboard shortcuts

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