logging

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// FatalLevel only
	FatalLevel = iota
	// ErrorLevel and below
	ErrorLevel
	// WarningLevel and below
	WarningLevel
	// DebugLevel and below
	DebugLevel
	// InfoLevel is all events
	InfoLevel
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

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

Logger provides logging functionality

func NewLogger

func NewLogger(stdOut, stdErr io.Writer, level string) *Logger

NewLogger returns logger instance

func (*Logger) Debug

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

Debug logs debug event

func (*Logger) Error

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

Error logs error event

func (*Logger) Fatal

func (l *Logger) Fatal(msg string, v ...interface{})

Fatal logs fatal error event

func (*Logger) Info

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

Info logs info event

func (*Logger) LogAndRaiseError

func (l *Logger) LogAndRaiseError(msg string, v ...interface{}) error

LogAndRaiseError logs error event and raises error

func (*Logger) SetSTDError

func (l *Logger) SetSTDError(w io.Writer)

SetSTDError provides realtime changing of output writer for stderr

func (*Logger) SetSTDOutput

func (l *Logger) SetSTDOutput(w io.Writer)

SetSTDOutput provides realtime changing of output writer for stdout

func (*Logger) Warning

func (l *Logger) Warning(msg string, v ...interface{})

Warning log event

Jump to

Keyboard shortcuts

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