logger

package
v0.0.0-...-a98f5d9 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Debug  = defaultLogger.Debug
	Debugf = defaultLogger.Debugf
	Info   = defaultLogger.Info
	Infof  = defaultLogger.Infof
	Warn   = defaultLogger.Warn
	Warnf  = defaultLogger.Warnf
	Error  = defaultLogger.Error
	Errorf = defaultLogger.Errorf
	Fatal  = defaultLogger.Fatal
	Fatalf = defaultLogger.Fatalf
)

Functions

This section is empty.

Types

type Level

type Level int8
const (
	L_DEBUG Level = iota + 1
	L_INFO
	L_WARN
	L_ERROR
	L_FATAL
)

func (Level) GetColorString

func (own Level) GetColorString() string

func (Level) GetString

func (own Level) GetString() string

func (Level) String

func (own Level) String() string

type Logger

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

func New

func New() *Logger

func WithFullFilename

func WithFullFilename() *Logger

func WithLevel

func WithLevel(level Level) *Logger

func (*Logger) Close

func (own *Logger) Close() (err error)

func (*Logger) Debug

func (own *Logger) Debug(msgs ...string)

func (*Logger) Debugf

func (own *Logger) Debugf(fmt string, args ...any)

func (*Logger) Error

func (own *Logger) Error(msgs ...string)

func (*Logger) Errorf

func (own *Logger) Errorf(fmt string, args ...any)

func (*Logger) Fatal

func (own *Logger) Fatal(msgs ...string)

func (*Logger) Fatalf

func (own *Logger) Fatalf(fmt string, args ...any)

func (*Logger) Info

func (own *Logger) Info(msgs ...string)

func (*Logger) Infof

func (own *Logger) Infof(fmt string, args ...any)

func (*Logger) SetLogFile

func (own *Logger) SetLogFile(level Level, filename string) error

func (*Logger) Warn

func (own *Logger) Warn(msgs ...string)

func (*Logger) Warnf

func (own *Logger) Warnf(fmt string, args ...any)

func (*Logger) WithFullFilename

func (own *Logger) WithFullFilename() *Logger

func (*Logger) WithLevel

func (own *Logger) WithLevel(level Level) *Logger

Jump to

Keyboard shortcuts

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