log

package
v0.0.0-...-8a5e3ba Latest Latest
Warning

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

Go to latest
Published: May 23, 2019 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// LogLevelMapping is a mapping for LogLevel enum
	LogLevelMapping = map[string]LogLevel{
		ERROR.String():   ERROR,
		WARNING.String(): WARNING,
		INFO.String():    INFO,
		DEBUG.String():   DEBUG,
		SILENT.String():  SILENT,
	}
)

Functions

func Debugln

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

func Errorln

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

func Fatalln

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

func Infoln

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

func SetLevel

func SetLevel(newLevel LogLevel)

func Subscribe

func Subscribe() observable.Subscription

func Warnln

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

Types

type Event

type Event struct {
	LogLevel LogLevel
	Payload  string
}

func (*Event) Type

func (e *Event) Type() string

type LogLevel

type LogLevel int
const (
	DEBUG LogLevel = iota
	INFO
	WARNING
	ERROR
	SILENT
)

func Level

func Level() LogLevel

func (LogLevel) MarshalJSON

func (l LogLevel) MarshalJSON() ([]byte, error)

MarshalJSON serialize LogLevel with json

func (LogLevel) String

func (l LogLevel) String() string

func (*LogLevel) UnmarshalJSON

func (l *LogLevel) UnmarshalJSON(data []byte) error

UnmarshalJSON unserialize LogLevel with json

func (*LogLevel) UnmarshalYAML

func (l *LogLevel) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML unserialize LogLevel with yaml

Jump to

Keyboard shortcuts

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