log

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2019 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
)

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) Error

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

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) 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