log

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(a ...any)

func Debugf

func Debugf(template string, a ...any)

func DisableColor

func DisableColor()

func DisableDebugMessages

func DisableDebugMessages()

func DisableOutput

func DisableOutput()

func EnableColor

func EnableColor()

func EnableDebugMessages

func EnableDebugMessages()

func EnableOutput

func EnableOutput()

func Error

func Error(a ...any)

func Errorf

func Errorf(template string, a ...any)

func Info

func Info(a ...any)

func Infof

func Infof(template string, a ...any)

func Print

func Print(a ...any)

func SetOutput

func SetOutput(output io.Writer)

func StandardErrorLogAdapter added in v0.0.9

func StandardErrorLogAdapter() *log.Logger

func Warning

func Warning(a ...any)

func Warningf

func Warningf(template string, a ...any)

Types

type LoggerOption

type LoggerOption = func(logger *PrefixedLogger)

func WithOutput

func WithOutput(writer io.Writer) LoggerOption

func WithStyle

func WithStyle(style *pterm.Style) LoggerOption

type PrefixedLogger

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

func NewLogger

func NewLogger(name string, options ...LoggerOption) *PrefixedLogger

func (*PrefixedLogger) Debug

func (logger *PrefixedLogger) Debug(v ...any)

func (*PrefixedLogger) Debugf

func (logger *PrefixedLogger) Debugf(template string, v ...any)

func (*PrefixedLogger) Error

func (logger *PrefixedLogger) Error(v ...any)

func (*PrefixedLogger) Errorf

func (logger *PrefixedLogger) Errorf(template string, v ...any)

func (*PrefixedLogger) Info

func (logger *PrefixedLogger) Info(v ...any)

func (*PrefixedLogger) Infof

func (logger *PrefixedLogger) Infof(template string, v ...any)

func (*PrefixedLogger) PrintResponse

func (logger *PrefixedLogger) PrintResponse(request *contracts.Request, statusCode int)

func (*PrefixedLogger) Warning

func (logger *PrefixedLogger) Warning(v ...any)

func (*PrefixedLogger) Warningf

func (logger *PrefixedLogger) Warningf(template string, v ...any)

Jump to

Keyboard shortcuts

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