log

package
v0.0.0-...-e5a7b82 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(arg0 string, args ...interface{})

we should never really use these . . . always prefer logging through a prefix logger

func Error

func Error(arg0 string, args ...interface{}) error

func Info

func Info(arg0 string, args ...interface{})

func LogTo

func LogTo(target string, level_name string)

func Warn

func Warn(arg0 string, args ...interface{}) error

Types

type Logger

type Logger interface {
	AddLogPrefix(string)
	ClearLogPrefixes()
	Debug(string, ...interface{})
	Info(string, ...interface{})
	Warn(string, ...interface{}) error
	Error(string, ...interface{}) error
}

func NewPrefixLogger

func NewPrefixLogger(prefixes ...string) Logger

type PrefixLogger

type PrefixLogger struct {
	*log.Logger
	// contains filtered or unexported fields
}

func (*PrefixLogger) AddLogPrefix

func (pl *PrefixLogger) AddLogPrefix(prefix string)

func (*PrefixLogger) ClearLogPrefixes

func (pl *PrefixLogger) ClearLogPrefixes()

func (*PrefixLogger) Debug

func (pl *PrefixLogger) Debug(arg0 string, args ...interface{})

func (*PrefixLogger) Error

func (pl *PrefixLogger) Error(arg0 string, args ...interface{}) error

func (*PrefixLogger) Info

func (pl *PrefixLogger) Info(arg0 string, args ...interface{})

func (*PrefixLogger) Warn

func (pl *PrefixLogger) Warn(arg0 string, args ...interface{}) error

Jump to

Keyboard shortcuts

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