ycho

package
v0.0.0-...-9853328 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(msg string)

func Debugf

func Debugf(msg string, v ...any)

func Error

func Error(msg error)

func Errorf

func Errorf(msg string, v ...any)

func Eventloop

func Eventloop()

func Fatal

func Fatal(msg error)

func Fatalf

func Fatalf(msg string, v ...any)

func Get

func Get() yocki.Ycho

func Info

func Info(msg string)

func Infof

func Infof(msg string, v ...any)

func NewTLog

func NewTLog(conf YchoOpt) (*tlog, error)

func NewZLog

func NewZLog(conf YchoOpt) (*zlog, error)

func Print

func Print(msg string)

func Printf

func Printf(format string, a ...any)

func Println

func Println(msg string)

func Progress

func Progress(total int64, r io.Reader) io.Reader

func Set

func Set(y yocki.Ycho)

func Warn

func Warn(msg error)

func Warnf

func Warnf(msg string, v ...any)

Types

type Vlog

type Vlog struct{}

func (*Vlog) Debug

func (v *Vlog) Debug(msg string)

func (*Vlog) Debugf

func (v *Vlog) Debugf(msg string, a ...any)

func (*Vlog) Error

func (v *Vlog) Error(msg string)

func (*Vlog) Errorf

func (v *Vlog) Errorf(msg string, a ...any)

func (*Vlog) Eventloop

func (v *Vlog) Eventloop()

func (*Vlog) Fatal

func (v *Vlog) Fatal(msg string)

func (*Vlog) Fatalf

func (v *Vlog) Fatalf(msg string, a ...any)

func (*Vlog) Info

func (v *Vlog) Info(msg string)

func (*Vlog) Infof

func (v *Vlog) Infof(msg string, a ...any)

func (*Vlog) Print

func (v *Vlog) Print(msg string)

func (*Vlog) Progress

func (v *Vlog) Progress(total int64, r io.Reader) io.Writer

func (*Vlog) Warn

func (v *Vlog) Warn(msg string)

func (*Vlog) Warnf

func (v *Vlog) Warnf(msg string, a ...any)

type YchoOpt

type YchoOpt struct {
	Level          string `yaml:"level"`
	Format         string `yaml:"format"`
	Path           string `yaml:"path"`
	FileName       string `yaml:"filename"`
	FileMaxSize    int    `yaml:"fileMaxSize"`
	FileMaxBackups int    `yaml:"fileMaxBackups"`
	MaxAge         int    `yaml:"maxAge"`
	Compress       bool   `yaml:"compress"`
	Stdout         bool   `yaml:"stdout"`
	Caller         bool   `yaml:"caller"`
	TimeFormat     string `yaml:"timeFormat"`
}

YchoOpt indicates the configuration of ycho. It is stored in the yockConf, loaded via init. You can set it using yock conf command.

func (*YchoOpt) Standardf

func (opt *YchoOpt) Standardf()

type YchoOption

type YchoOption func(yocki.Ycho) error

type Ylog

type Ylog struct {
	Vlog
}

func NewYLog

func NewYLog() *Ylog

func (*Ylog) Debug

func (y *Ylog) Debug(msg string)

func (*Ylog) Debugf

func (y *Ylog) Debugf(msg string, a ...any)

func (*Ylog) Error

func (y *Ylog) Error(msg string)

func (*Ylog) Errorf

func (y *Ylog) Errorf(msg string, a ...any)

func (*Ylog) Fatal

func (y *Ylog) Fatal(msg string)

func (*Ylog) Fatalf

func (y *Ylog) Fatalf(msg string, a ...any)

func (*Ylog) Info

func (y *Ylog) Info(msg string)

func (*Ylog) Infof

func (y *Ylog) Infof(msg string, a ...any)

func (*Ylog) Warn

func (y *Ylog) Warn(msg string)

func (*Ylog) Warnf

func (y *Ylog) Warnf(msg string, a ...any)

Jump to

Keyboard shortcuts

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