level

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2017 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Map map[Level]LevelName = map[Level]LevelName{
		FATAL:    `FATAL`,
		ALERT:    `ALERT`,
		CRITICAL: `CRITICAL`,
		ERROR:    `ERROR`,
		WARNING:  `WARNING`,
		NOTICE:   `NOTICE`,
		INFO:     `INFO`,
		DEBUG:    `DEBUG`,
	}
	L         LevelObject
	Map2Level map[LevelName]Level // Обратная карта от Map (create on init() by Map)
)

Functions

This section is empty.

Types

type Level

type Level int8 // Тип уровня журналирования
const (
	FATAL    Level = iota // 0 Fatal: system is unusable
	ALERT                 // 1 Alert: action must be taken immediately
	CRITICAL              // 2 Critical: critical conditions
	ERROR                 // 3 Error: error conditions
	WARNING               // 4 Warning: warning conditions
	NOTICE                // 5 Notice: normal but significant condition
	INFO                  // 6 Informational: informational messages
	DEBUG                 // 7 Debug: debug-level messages
)
const (
	// The level of logging by default for messages without specifying the level
	DEFAULT_LEVEL Level = NOTICE
)

type LevelName

type LevelName string // Названиетипа уровня журналирования

type LevelObject

type LevelObject struct {
	Level
}

func New

func New(l Level) *LevelObject

New - Creating an object, level logging

func NewFromMesssage

func NewFromMesssage(str string, deflt Level) *LevelObject

NewFromMesssage - Determines the level of logging on the first word of the message

func (*LevelObject) Int8

func (self *LevelObject) Int8() int8

func (*LevelObject) String

func (self *LevelObject) String() (ret string)

Jump to

Keyboard shortcuts

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