esyncutil

package
v0.0.0-...-5c89f79 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LevelDebug = "DEBUG"
	LevelInfo  = "INFO"
	LevelWarn  = "WARN"
	LevelError = "ERROR"
)

Variables

This section is empty.

Functions

func CRC32

func CRC32(params ...interface{}) uint32

func SetLogger

func SetLogger(newLogger Logger)

Types

type Alerter

type Alerter interface {
	Errorf(ctx context.Context, format string, args ...interface{})
	Warnf(ctx context.Context, format string, args ...interface{})
	Infof(ctx context.Context, format string, args ...interface{})
}

cclehui_test

type DefaultLogger

type DefaultLogger struct{}

func (*DefaultLogger) Errorf

func (l *DefaultLogger) Errorf(ctx context.Context, format string, args ...interface{})

func (*DefaultLogger) Infof

func (l *DefaultLogger) Infof(ctx context.Context, format string, args ...interface{})

func (*DefaultLogger) Warnf

func (l *DefaultLogger) Warnf(ctx context.Context, format string, args ...interface{})

type LogData

type LogData struct {
	Source  string `json:"source"`
	Level   string `json:"level"`
	Time    string `json:"time"`
	Content string `json:"content"`
}

type Logger

type Logger interface {
	Errorf(ctx context.Context, format string, args ...interface{})
	Warnf(ctx context.Context, format string, args ...interface{})
	Infof(ctx context.Context, format string, args ...interface{})
}

func GetLogger

func GetLogger() Logger

Jump to

Keyboard shortcuts

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