logger

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: May 10, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

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

func SetLoggerDebug(logFunc LogFunc)

SetLoggerDebug custom your debug log implementation.

func SetLoggerError

func SetLoggerError(logFunc LogFunc)

SetLoggerError custom your error level log implementation.

func SetLoggerInfo

func SetLoggerInfo(logFunc LogFunc)

SetLoggerInfo custom your info log implementation.

func SetLoggerLevel

func SetLoggerLevel(level LogLevel)

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

func SetLoggerWarn

func SetLoggerWarn(logFunc LogFunc)

SetLoggerWarn custom your warn level log implementation.

func Warnf

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

Warnf prints warn level log.

Types

type LogFunc

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

LogFunc is alias of logger function.

type LogLevel

type LogLevel int8

LogLevel is level of logger.

const (
	// LogLevelDebug is DEBUG level.
	LogLevelDebug LogLevel = iota
	// LogLevelInfo is INFO level.
	LogLevelInfo
	// LogLevelWarn is WARN level.
	LogLevelWarn
	// LogLevelError is ERROR level.
	LogLevelError
)

Jump to

Keyboard shortcuts

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