logger

package
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Console added in v0.0.7

type Console interface {
	Debugln(_ ...interface{})
	Infoln(_ ...interface{})
	Println(_ ...interface{})
	Warnln(_ ...interface{})
	Warningln(_ ...interface{})
	Errorln(_ ...interface{})
	Fatalln(_ ...interface{})
	Panicln(_ ...interface{})
}

Console log abstraction

type Factory

type Factory interface {
	WithVerbose() Factory
	WithFormatText() Factory
	WithFormatJSON() Factory
	WithCallerReporting() Factory
	WithFields(fields Fields) Factory
	WithField(key string, value interface{}) Factory
	Get() Logger
}

Factory abstraction for log instance configuration

func NewFactory

func NewFactory() Factory

NewFactory returns a new instanced of logger.Factory

type Fields

type Fields = map[string]interface{}

Fields alias for multiple extra fields

type Format added in v0.0.7

type Format interface {
	Debugf(_ string, _ ...interface{})
	Infof(_ string, _ ...interface{})
	Printf(_ string, _ ...interface{})
	Warnf(_ string, _ ...interface{})
	Warningf(_ string, _ ...interface{})
	Errorf(_ string, _ ...interface{})
	Fatalf(_ string, _ ...interface{})
	Panicf(_ string, _ ...interface{})
}

Format log abstraction

type FormatLogger added in v0.0.7

type FormatLogger interface {
	Logger
	Format
}

FormatLogger log abstraction

type FullLogger added in v0.0.7

type FullLogger interface {
	Logger
	Console
	Format
	Traceable
}

FullLogger log abstraction

func NewNullLogger

func NewNullLogger() FullLogger

NewNullLogger returns a logger that does log anything

type Logger

type Logger interface {
	Debug(_ ...interface{})
	Print(_ ...interface{})
	Info(_ ...interface{})
	Warn(_ ...interface{})
	Warning(_ ...interface{})
	Error(_ ...interface{})
	Fatal(_ ...interface{})
	Panic(_ ...interface{})
}

Logger log abstraction

type Traceable added in v0.0.3

type Traceable interface {
	Trace(_ ...interface{})
	Traceln(_ ...interface{})
	Tracef(_ string, _ ...interface{})
}

Traceable log abstraction

Jump to

Keyboard shortcuts

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