flielog

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2019 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogFileName = "flogo.log"
)

Variables

View Source
var (
	//TestLog, _ = NewZapLogger(&Opt{LogOutput: CONSOLE, LogLevel: INFO})
	BLogger, _ = NewZapLogger(
		&Opt{
			LogPath:   os.TempDir(),
			LogName:   LogFileName,
			MaxBackup: 100,
			LogLevel:  DEBUG,
			LogOutput: ALL,
		})
)

Functions

func NewZapLogger

func NewZapLogger(opt *Opt) (*zap.Logger, io.Writer)

Types

type Level

type Level int
const (
	DEBUG Level = iota
	INFO
	WARN
	ERROR
	FATAL
)

func (*Level) Unmarshal

func (l *Level) Unmarshal(text string)

type Opt

type Opt struct {
	LogPath   string
	LogName   string
	LogLevel  Level
	MaxSize   int
	MaxBackup int
	MaxAge    int
	LogOutput Output
}

type Output

type Output int
const (
	FILE Output = iota
	CONSOLE
	ALL
)

Jump to

Keyboard shortcuts

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