level

package
v0.0.0-...-841c510 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2015 License: Apache-2.0 Imports: 1 Imported by: 39

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Var

func Var(lv *Level, defaultLv Level) levelVar

flags.Var(Var(&param, level.INFO), "level", "Log level") の形で使う。

Types

type Level

type Level int
const (
	// 表示レベル無指定 0 なら OFF になるので、何も出力しない。
	OFF Level = iota

	ERR
	WARN
	INFO
	DEBUG

	ALL
)

func ValueOf

func ValueOf(label string) (Level, error)

文字列から値に。

func Values

func Values() []Level

重要度降順で列挙する。

func (Level) Higher

func (lv Level) Higher(lv2 Level) bool

lv が lv2 より重要なときのみ true。

func (Level) Lower

func (lv Level) Lower(lv2 Level) bool

lv が lv2 より重要でないときのみ true。

func (Level) String

func (lv Level) String() string

Jump to

Keyboard shortcuts

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