logger

package
v0.0.0-...-5072f25 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(v ...interface{})

func Debugf

func Debugf(format string, v ...interface{})

func Error

func Error(v ...interface{})

func Errorf

func Errorf(format string, v ...interface{})

func Info

func Info(v ...interface{})

func Infof

func Infof(format string, v ...interface{})

func Warn

func Warn(v ...interface{})

func Warnf

func Warnf(format string, v ...interface{})

Types

type Level

type Level int

Level is the level of logging.

const (
	LevelDebug Level = iota // Debug level.
	LevelInfo               // Info level.
	LevelWarn               // Warn level.
	LevelError              // Error level.
)

type Logger

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

Logger is a simple logger that logs to a writer.

func FromEnv

func FromEnv(out io.Writer) *Logger

FromEnv creates a logger from the environment variable LOG_LEVEL.

func (*Logger) Debug

func (l *Logger) Debug(v ...interface{})

func (*Logger) Debugf

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

func (*Logger) Error

func (l *Logger) Error(v ...interface{})

func (*Logger) Errorf

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

func (*Logger) Info

func (l *Logger) Info(v ...interface{})

func (*Logger) Infof

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

func (*Logger) Warn

func (l *Logger) Warn(v ...interface{})

func (*Logger) Warnf

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

Jump to

Keyboard shortcuts

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