log

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2019 License: MIT Imports: 7 Imported by: 1

README

log

simple golang log library

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Output

type Output interface {
	io.Closer
	WriteLine(msg string)
	WriteLines(msg []string)
}

func CombineOutput

func CombineOutput(outputs ...Output) Output

func MutOutput

func MutOutput(output Output) Output

func NewFileOutput

func NewFileOutput(path string) (Output, error)

func NewStdOutput

func NewStdOutput() Output

func NewStringWriterOutput

func NewStringWriterOutput(writer io.StringWriter) Output

type Root

type Root struct {
	// contains filtered or unexported fields
}

func CreateCommonDueRoot

func CreateCommonDueRoot(path string) *Root

func NewRoot

func NewRoot(output Output) *Root

func (*Root) Close

func (root *Root) Close() error

func (*Root) Print

func (root *Root) Print(tag string, t Type, format string, args ...interface{})

func (*Root) Tagged

func (root *Root) Tagged(tag string) *Tagged

func (*Root) WriteLine

func (root *Root) WriteLine(msg string)

func (*Root) WriteLines

func (root *Root) WriteLines(msg []string)

type Tagged

type Tagged struct {
	// contains filtered or unexported fields
}

func (*Tagged) D

func (tagged *Tagged) D(format string, args ...interface{})

func (*Tagged) F

func (tagged *Tagged) F(format string, args ...interface{})

func (*Tagged) I

func (tagged *Tagged) I(format string, args ...interface{})

func (*Tagged) P

func (tagged *Tagged) P(format string, args ...interface{})

func (*Tagged) Print

func (tagged *Tagged) Print(t Type, format string, args ...interface{})

func (*Tagged) V

func (tagged *Tagged) V(format string, args ...interface{})

type Type

type Type uint8
const (
	TYPE_V Type = iota
	TYPE_D
	TYPE_I
	TYPE_F
	TYPE_P
)

Jump to

Keyboard shortcuts

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