services

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2020 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHadeConsoleLog

func NewHadeConsoleLog(params ...interface{}) (interface{}, error)

func NewHadeRotateLog

func NewHadeRotateLog(params ...interface{}) (interface{}, error)

func NewHadeSingleLog

func NewHadeSingleLog(params ...interface{}) (interface{}, error)

NewHadeSingleLog params sequence: level, ctxFielder, Formatter, map[string]interface(folder/file)

Types

type HadeConsoleLog

type HadeConsoleLog struct {
	HadeLog
}

type HadeLog

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

func (*HadeLog) Debug

func (log *HadeLog) Debug(ctx context.Context, msg string, fields map[string]interface{})

Debug will add debug record which contains msg and fields

func (*HadeLog) Error

func (log *HadeLog) Error(ctx context.Context, msg string, fields map[string]interface{})

Error will add error record which contains msg and fields

func (*HadeLog) Fatal

func (log *HadeLog) Fatal(ctx context.Context, msg string, fields map[string]interface{})

Fatal will add fatal record which contains msg and fields

func (*HadeLog) Info

func (log *HadeLog) Info(ctx context.Context, msg string, fields map[string]interface{})

Info will add info record which contains msg and fields

func (*HadeLog) IsLevelEnable

func (log *HadeLog) IsLevelEnable(level contract.LogLevel) bool

func (*HadeLog) Panic

func (log *HadeLog) Panic(ctx context.Context, msg string, fields map[string]interface{})

Panic will call panic(fields) for debug

func (*HadeLog) SetCxtFielder

func (log *HadeLog) SetCxtFielder(handler contract.CtxFielder)

SetCxtFielder will get fields from context

func (*HadeLog) SetFormatter

func (log *HadeLog) SetFormatter(formatter contract.Formatter)

SetFormatter will set formatter handler will covert data to string for recording

func (*HadeLog) SetLevel

func (log *HadeLog) SetLevel(level contract.LogLevel)

SetLevel set log level, and higher level will be recorded

func (*HadeLog) SetOutput

func (log *HadeLog) SetOutput(output io.Writer)

Set Output set out put file

func (*HadeLog) Trace

func (log *HadeLog) Trace(ctx context.Context, msg string, fields map[string]interface{})

Trace will add trace info which contains msg and fields

func (*HadeLog) Warn

func (log *HadeLog) Warn(ctx context.Context, msg string, fields map[string]interface{})

Warn will add warn record which contains msg and fields

type HadeRotateLog

type HadeRotateLog struct {
	HadeLog
	// contains filtered or unexported fields
}

func (*HadeRotateLog) SetDateFormat

func (l *HadeRotateLog) SetDateFormat(dateFormat string)

func (*HadeRotateLog) SetFile

func (l *HadeRotateLog) SetFile(file string)

func (*HadeRotateLog) SetFolder

func (l *HadeRotateLog) SetFolder(folder string)

func (*HadeRotateLog) SetMaxFiles

func (l *HadeRotateLog) SetMaxFiles(maxFiles int)

type HadeSingleLog

type HadeSingleLog struct {
	HadeLog
	// contains filtered or unexported fields
}

func (*HadeSingleLog) SetFile

func (l *HadeSingleLog) SetFile(file string)

func (*HadeSingleLog) SetFolder

func (l *HadeSingleLog) SetFolder(folder string)

Jump to

Keyboard shortcuts

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