logger

package
v0.0.0-...-54f910c Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Level

type Level int
const (
	Debug Level = iota
	Info
	Error
	Fatal
)

type LogHandler

type LogHandler struct {
	Debug *log.Logger
	Info  *log.Logger
	Error *log.Logger
	Fatal *log.Logger
}

func NewDiscard

func NewDiscard(debug bool) *LogHandler

func NewStderr

func NewStderr(debug bool) *LogHandler

func NewSyslog

func NewSyslog(debug bool) *LogHandler

type Logger

type Logger struct {
	Handler *LogHandler
}

Wrap handler to simpliy interface

func New

func New(handler *LogHandler) *Logger

func (*Logger) Debug

func (l *Logger) Debug(v ...any)

func (*Logger) Debugf

func (l *Logger) Debugf(format string, v ...any)

func (*Logger) Error

func (l *Logger) Error(v ...any)

func (*Logger) Errorf

func (l *Logger) Errorf(format string, v ...any)

func (*Logger) Fatal

func (l *Logger) Fatal(v ...any)

func (*Logger) Fatalf

func (l *Logger) Fatalf(format string, v ...any)

func (*Logger) Info

func (l *Logger) Info(v ...any)

func (*Logger) Infof

func (l *Logger) Infof(format string, v ...any)

func (*Logger) Print

func (l *Logger) Print(v ...any)

Alias Print() to Info()

func (*Logger) Printf

func (l *Logger) Printf(format string, v ...any)

Jump to

Keyboard shortcuts

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