gxlog

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2018 License: MIT Imports: 3 Imported by: 1

README

gxlog

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Formatter

type Formatter interface {
	Format(record *Record) []byte
}
type Link struct {
	FT Formatter
	WT Writer
}

type LogLevel

type LogLevel int
const (
	LevelDebug LogLevel = iota
	LevelInfo
	LevelWarn
	LevelError
	LevelFatal
	LevelOff
)

type Logger

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

func (*Logger) Debug

func (this *Logger) Debug(args ...interface{})

func (*Logger) Debugf

func (this *Logger) Debugf(fmtstr string, args ...interface{})

func (*Logger) Error

func (this *Logger) Error(args ...interface{})

func (*Logger) Errorf

func (this *Logger) Errorf(fmtstr string, args ...interface{})

func (*Logger) Fatal

func (this *Logger) Fatal(args ...interface{})

func (*Logger) Fatalf

func (this *Logger) Fatalf(fmtstr string, args ...interface{})

func (*Logger) Info

func (this *Logger) Info(args ...interface{})

func (*Logger) Infof

func (this *Logger) Infof(fmtstr string, args ...interface{})
func (this *Logger) Link(ft Formatter, wt Writer)

func (*Logger) LinkAll

func (this *Logger) LinkAll(links []Link)

func (*Logger) Log

func (this *Logger) Log(level LogLevel, args []interface{})

func (*Logger) Logf

func (this *Logger) Logf(level LogLevel, fmtstr string, args []interface{})

func (*Logger) ResetAll

func (this *Logger) ResetAll(links []Link)

func (*Logger) UnlinkAll

func (this *Logger) UnlinkAll()

func (*Logger) Warn

func (this *Logger) Warn(args ...interface{})

func (*Logger) Warnf

func (this *Logger) Warnf(fmtstr string, args ...interface{})

type Record

type Record struct {
	Time     time.Time
	Level    LogLevel
	Pathname string
	Line     int
	Func     string
	Msg      string
}

type Writer

type Writer interface {
	Write(bs []byte, record *Record)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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