ylog

package
v0.0.0-...-c037550 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DebugLevel int = iota - 1
	InfoLevel
	WarnLevel
	ErrorLevel
	DPanicLevel
	PanicLevel
	FatalLevel
)

Variables

This section is empty.

Functions

func Debugf

func Debugf(msg string, format string, v ...interface{})

func Errorf

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

func Fatalf

func Fatalf(msg string, format string, v ...interface{})

func Infof

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

func InitLogger

func InitLogger(logger *YLog)

func Warnf

func Warnf(msg string, format string, v ...interface{})

Types

type Option

type Option func(opts *Options)

func WithLevel

func WithLevel(level int) Option

func WithLogFile

func WithLogFile(logFile string) Option

func WithMaxAge

func WithMaxAge(maxAge int) Option

func WithMaxBackups

func WithMaxBackups(maxBackups int) Option

func WithMaxSize

func WithMaxSize(maxSize int) Option

type Options

type Options struct {
	LogFile    string
	MaxSize    int
	MaxAge     int
	MaxBackups int
	Level      int
}

type YLog

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

Logger

func NewYLog

func NewYLog(opts ...interface{}) *YLog

func (*YLog) Print

func (l *YLog) Print(v ...interface{})

func (*YLog) Printf

func (l *YLog) Printf(format string, v ...interface{})

func (*YLog) Println

func (l *YLog) Println(v ...interface{})

func (*YLog) SetMsg

func (l *YLog) SetMsg(msg string)

Jump to

Keyboard shortcuts

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