logger

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2019 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debugf

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

Debugf prints debug level log.

func DisablePrefix

func DisablePrefix()

DisablePrefix disable print level prefix.

func Errorf

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

Errorf prints error level log.

func Infof

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

Infof prints info level log.

func IsDebugEnabled

func IsDebugEnabled() bool

IsDebugEnabled returns true if debug level is open.

func SetFunc

func SetFunc(level Level, fn Func)

SetFunc set logger func for custom level.

func SetLevel

func SetLevel(level Level)

SetLevel set global RSocket log level. Available levels are `LogLevelDebug`, `LogLevelInfo`, `LogLevelWarn` and `LogLevelError`.

func Warnf

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

Warnf prints warn level log.

Types

type Func

type Func = func(string, ...interface{})

Func is alias of logger function.

type Level

type Level int8

Level is level of logger.

const (
	// LevelDebug is DEBUG level.
	LevelDebug Level = iota
	// LevelInfo is INFO level.
	LevelInfo
	// LevelWarn is WARN level.
	LevelWarn
	// LevelError is ERROR level.
	LevelError
)

func GetLevel

func GetLevel() Level

GetLevel returns current logger level.

func (Level) String

func (s Level) String() string

Jump to

Keyboard shortcuts

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