logger

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close()

func Debugf

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

func Errorf

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

func Fatalf

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

func Infof

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

func Init

func Init(filename, level string)

func Warningf

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

Types

type LogLevel

type LogLevel int
const (
	LOG_DEBUG LogLevel = iota
	LOG_INFO
	LOG_WARNING
	LOG_ERROR
	LOG_FATAL
)

func (LogLevel) String

func (ll LogLevel) String() string

type Logger

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

func NewLogger

func NewLogger(fileName string, prefix string, level string) *Logger

func (*Logger) Close

func (l *Logger) Close() bool

func (*Logger) WithLevelf

func (l *Logger) WithLevelf(lev LogLevel, format string, v ...interface{})

Jump to

Keyboard shortcuts

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