logger

package
v0.0.0-...-9f455dc Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JsonFormat = "json"
	TextFormat = "text"
)
View Source
const (
	LevelTrace = "trace"
	LevelDebug = "debug"
	LevelInfo  = "info"
	LevelWarn  = "warn"
	LevelError = "error"
	LevelPanic = "panic"
	LevelFatal = "fatal"
)

Variables

This section is empty.

Functions

func Close

func Close() error

func Debug

func Debug(args ...any)

func Debugf

func Debugf(format string, args ...any)

func Error

func Error(args ...any)

func Errorf

func Errorf(format string, args ...any)

func Fatal

func Fatal(args ...any)

func Fatalf

func Fatalf(format string, args ...any)

func Info

func Info(args ...any)

func Infof

func Infof(format string, args ...any)

func Panic

func Panic(args ...any)

func Panicf

func Panicf(format string, args ...any)

func Setup

func Setup(config Config) error

func Trace

func Trace(args ...any)

func Tracef

func Tracef(format string, args ...any)

func Warn

func Warn(args ...any)

func Warnf

func Warnf(format string, args ...any)

Types

type Config

type Config struct {
	Level    string `json:"level" yaml:"level"`
	Format   string `json:"format" yaml:"format"`
	InfoLog  string `json:"infoLog" yaml:"infoLog"`
	ErrorLog string `json:"errorLog" yaml:"errorLog"`
}

type HookCloser

type HookCloser interface {
	logrus.Hook
	io.Closer
}

type Logger

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

func (*Logger) Close

func (l *Logger) Close() error

Jump to

Keyboard shortcuts

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