log

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2020 License: Apache-2.0 Imports: 6 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 (
	ErrorLevel Level = 0 // Errors should be properly handled
	WarnLevel  Level = 1 // Errors could be ignored; messages might need noticed
	InfoLevel  Level = 2 // Informational messages
	DebugLevel Level = 3 // Debug messages
)

func ParseLevel

func ParseLevel(levelString string) Level

type Logger

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

func NewFileLogger

func NewFileLogger(path string, logLevel Level) Logger

func NewLogger

func NewLogger(out io.WriteCloser, logLevel Level) Logger

func (Logger) Close

func (l Logger) Close() error

func (Logger) Debug

func (l Logger) Debug(args ...interface{})

func (Logger) Error

func (l Logger) Error(args ...interface{})

func (Logger) GetLogger

func (l Logger) GetLogger() *log.Logger

func (Logger) Info

func (l Logger) Info(args ...interface{})

func (Logger) NewWithRequestID

func (l Logger) NewWithRequestID(requestID string) Logger

func (Logger) Println

func (l Logger) Println(args ...interface{})

Write a new line with args. Unless you really want to customize output format, use "Info", "Warn", "Error" instead

func (*Logger) ReopenLogFile

func (l *Logger) ReopenLogFile()

func (Logger) Warn

func (l Logger) Warn(args ...interface{})

Jump to

Keyboard shortcuts

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