mlog

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LoggerDateLayout = "15:04:05.000"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LogFile

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

func NewLogFile

func NewLogFile(dir, name string, maxSize int64, maxCount int64) (lf *LogFile, err error)

func (*LogFile) Close

func (l *LogFile) Close() error

func (*LogFile) Write

func (l *LogFile) Write(p []byte) (n int, err error)

type Logger

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

func NewLogger

func NewLogger(opts LoggerOptions) (logger *Logger, err error)

func (*Logger) AppendErr added in v1.5.3

func (l *Logger) AppendErr(b []byte)

func (*Logger) AppendOut added in v1.5.3

func (l *Logger) AppendOut(b []byte)

func (*Logger) Close added in v1.5.2

func (l *Logger) Close() error

func (*Logger) Error

func (l *Logger) Error(items ...interface{})

func (*Logger) Errorf

func (l *Logger) Errorf(pattern string, items ...interface{})

func (*Logger) FormatLine added in v1.5.3

func (l *Logger) FormatLine(b []byte) (bufConsole []byte, bufFile []byte)

func (*Logger) Print

func (l *Logger) Print(items ...interface{})

func (*Logger) Printf

func (l *Logger) Printf(pattern string, items ...interface{})

func (*Logger) StreamErr

func (l *Logger) StreamErr(r io.Reader)

func (*Logger) StreamOut

func (l *Logger) StreamOut(r io.Reader)

type LoggerOptions added in v1.5.2

type LoggerOptions struct {
	Dir      string
	Name     string
	Filename string
}

Jump to

Keyboard shortcuts

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