logger

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Critical

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

func Debug

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

func Error

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

func Info

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

func SetLevelByString

func SetLevelByString(level string)

func SetOutput

func SetOutput(output io.Writer)

func Warn

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

Types

type Level

type Level uint32
const (
	CriticalLevel Level = iota
	ErrorLevel
	WarnLevel
	InfoLevel
	DebugLevel
)

func StringToLevel

func StringToLevel(level string) Level

func (Level) String

func (level Level) String() string

type Logger

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

func NewLogger

func NewLogger() *Logger

func (*Logger) Critical

func (logger *Logger) Critical(format string, args ...interface{})

func (*Logger) Debug

func (logger *Logger) Debug(format string, args ...interface{})

func (*Logger) Error

func (logger *Logger) Error(format string, args ...interface{})

func (*Logger) HideCallstack

func (logger *Logger) HideCallstack() *Logger

func (*Logger) Info

func (logger *Logger) Info(format string, args ...interface{})

func (*Logger) SetLevel

func (logger *Logger) SetLevel(level Level)

func (*Logger) SetLevelByString

func (logger *Logger) SetLevelByString(level string)

func (*Logger) SetOutput

func (logger *Logger) SetOutput(output io.Writer) *Logger

func (*Logger) SetPrefix

func (logger *Logger) SetPrefix(prefix string) *Logger

func (*Logger) SetSuffix

func (logger *Logger) SetSuffix(suffix string) *Logger

func (*Logger) Warn

func (logger *Logger) Warn(format string, args ...interface{})

Jump to

Keyboard shortcuts

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