logie

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BuildVersion string

Functions

func SetGlobalLevel

func SetGlobalLevel(level zerolog.Level)

func SetModuleLevel

func SetModuleLevel(module string, level zerolog.Level)

Types

type Config

type Config struct {
	GlobalLevel  zerolog.Level
	ModuleLevels map[string]zerolog.Level
}

type Formatter

type Formatter interface {
	Format([]byte) ([]byte, error)
}

type Logger

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

func New

func New(out io.Writer, opts ...Option) *Logger

func (*Logger) Debug

func (l *Logger) Debug(msg string)

func (*Logger) Debugf

func (l *Logger) Debugf(format string, args ...interface{})

func (*Logger) Error

func (l *Logger) Error(msg string)

func (*Logger) Errorf

func (l *Logger) Errorf(format string, args ...interface{})

func (*Logger) Fatal

func (l *Logger) Fatal(msg string)

func (*Logger) Fatalf

func (l *Logger) Fatalf(format string, args ...interface{})

func (*Logger) Info

func (l *Logger) Info(msg string)

func (*Logger) Infof

func (l *Logger) Infof(format string, args ...interface{})

func (*Logger) Panic

func (l *Logger) Panic(msg string)

func (*Logger) Panicf

func (l *Logger) Panicf(format string, args ...interface{})

func (*Logger) Trace

func (l *Logger) Trace(msg string)

func (*Logger) Tracef

func (l *Logger) Tracef(format string, args ...interface{})

func (*Logger) Warn

func (l *Logger) Warn(msg string)

func (*Logger) Warnf

func (l *Logger) Warnf(format string, args ...interface{})

func (*Logger) WithField

func (l *Logger) WithField(key string, value interface{}) *Logger

WithField returns a new Logger with an added field.

func (*Logger) WithFields

func (l *Logger) WithFields(fields map[string]interface{}) *Logger

type Option

type Option func(*Logger)

func WithFormatter

func WithFormatter(formatter Formatter) Option

func WithModule

func WithModule(module string) Option

Jump to

Keyboard shortcuts

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