log

package
v1.1.0-1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2017 License: Apache-2.0 Imports: 7 Imported by: 5

Documentation

Index

Constants

View Source
const (
	LUTC       = log.LUTC
	Ldate      = log.Ldate
	Ltime      = log.Ltime
	Llongfile  = log.Llongfile
	Lshortfile = log.Lshortfile
	LstdFlags  = log.LstdFlags
)
View Source
const (
	FileFlagsAppend = os.O_APPEND | os.O_CREATE | os.O_WRONLY
	FileNameStdout  = `/dev/stdout`
	FileNameStderr  = `/dev/stderr`
	FileModeDefault = 0640
	DirModeDefault  = 0750
)

Variables

This section is empty.

Functions

func LoggerFlags

func LoggerFlags(fs ...string) (lf int)

Types

type MLogger

type MLogger interface {
	Fatal(...interface{})
	Fatalf(string, ...interface{})
	Fatalln(...interface{})
	Flags() int
	Output(int, string) error
	Panic(...interface{})
	Panicf(string, ...interface{})
	Panicln(...interface{})
	Prefix() string
	Print(...interface{})
	Printf(string, ...interface{})
	Println(...interface{})
	SetFlags(int)
	SetOutput(io.Writer)
	SetPrefix(string)

	AddFile(string) error
	AddWriter(io.Writer)
	Write([]byte) (int, error)
	Close()
}

func NewMLogger

func NewMLogger(prefix string, flags int, stdout, stderr bool, files ...string) MLogger

type MWriter

type MWriter interface {
	io.Writer
	AddFile(fn string) error
	AddWriter(io.Writer)
	Close()
}

func NewMWriter

func NewMWriter(stdout, stderr bool, files ...string) MWriter

Jump to

Keyboard shortcuts

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