logger

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(msg string, keyvals ...interface{})

func Error

func Error(msg string, keyvals ...interface{})

func Fatal

func Fatal(msg string, keyvals ...interface{})

func Info

func Info(msg string, keyvals ...interface{})

func InitLogger

func InitLogger(conf *Config)

func Panic

func Panic(msg string, keyvals ...interface{})

func Trace

func Trace(msg string, keyvals ...interface{})

func Warn

func Warn(msg string, keyvals ...interface{})

Types

type Config

type Config struct {
	Colorful bool              `toml:"colorful"`
	Levels   map[string]string `toml:"levels"`
}

func DefaultConfig

func DefaultConfig() *Config

func (*Config) SanityCheck

func (conf *Config) SanityCheck() error

SanityCheck performs basic checks on the configuration.

type Logger

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

func NewLogger

func NewLogger(name string, obj interface{}) *Logger

func (*Logger) Debug

func (l *Logger) Debug(msg string, keyvals ...interface{})

func (*Logger) Error

func (l *Logger) Error(msg string, keyvals ...interface{})

func (*Logger) Fatal

func (l *Logger) Fatal(msg string, keyvals ...interface{})

func (*Logger) Info

func (l *Logger) Info(msg string, keyvals ...interface{})

func (*Logger) Panic

func (l *Logger) Panic(msg string, keyvals ...interface{})

func (*Logger) SetLevel

func (l *Logger) SetLevel(level logrus.Level)

func (*Logger) Trace

func (l *Logger) Trace(msg string, keyvals ...interface{})

func (*Logger) Warn

func (l *Logger) Warn(msg string, keyvals ...interface{})

func (*Logger) With

func (l *Logger) With(keyvals ...interface{}) *logrus.Entry

Jump to

Keyboard shortcuts

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