slog

package
v0.0.0-...-372ebbf Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2021 License: Apache-2.0 Imports: 7 Imported by: 7

Documentation

Index

Constants

View Source
const LogBufferLength = 65535

Variables

This section is empty.

Functions

func Close

func Close()

func LogDebug

func LogDebug(name string, format string, args ...interface{})

func LogError

func LogError(name string, format string, args ...interface{})

func LogInfo

func LogInfo(name string, format string, args ...interface{})

func LogWarning

func LogWarning(name string, format string, args ...interface{})

func Run

func Run()

func SetDebugLevel

func SetDebugLevel(level Level)

func SetLogPath

func SetLogPath(path string)

Types

type FileWriter

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

type Level

type Level uint32
const (
	DEBUG Level = iota
	INFO
	WARNING
	ERROR
)
var LOG_LEVEL Level = DEBUG

func DebugLevel

func DebugLevel() Level

func (Level) String

func (l Level) String() string

type LogRecord

type LogRecord struct {
	Level   Level
	Created time.Time

	Name    string
	Message string
	// contains filtered or unexported fields
}

func (*LogRecord) Reset

func (this *LogRecord) Reset()

type LogWriter

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

func (*LogWriter) DoClose

func (this *LogWriter) DoClose()

func (*LogWriter) InitPath

func (this *LogWriter) InitPath(p string)

func (*LogWriter) LogWrite

func (this *LogWriter) LogWrite(rec *LogRecord)

func (*LogWriter) MakeLogTimePath

func (this *LogWriter) MakeLogTimePath()

func (*LogWriter) MakePath

func (this *LogWriter) MakePath()

func (*LogWriter) Recover

func (this *LogWriter) Recover()

func (*LogWriter) Run

func (this *LogWriter) Run(b bool)

Jump to

Keyboard shortcuts

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