log

package
v0.0.0-...-5dcfad9 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Debugf = std.Debugf
	Infof  = std.Infof
	Warnf  = std.Warnf
	Errorf = std.Errorf

	WithFields = std.WithFields
)

User can directly use package level functions

Functions

func Init

func Init(logfile string, json, verbose, quiet, condense bool)

Init log

Types

type Fields

type Fields map[string]interface{}

Fields ...

type Logger

type Logger struct {
	Out        io.Writer
	Verbose    bool
	JSONFormat bool
	Condense   bool
	ExitFunc   exitFunc
}

Logger ...

func New

func New() *Logger

New logger

func (*Logger) Debugf

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

Debugf ...

func (*Logger) Errorf

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

Errorf ...

func (*Logger) Infof

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

Infof ...

func (*Logger) Warnf

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

Warnf ...

func (*Logger) WithFields

func (l *Logger) WithFields(fields Fields) *entry

WithFields ...

Jump to

Keyboard shortcuts

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