logx

package
v1.4.5 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetLogger

func SetLogger(l Logger)

Types

type AliyunLogger added in v1.4.4

type AliyunLogger struct {
}

func (*AliyunLogger) Error added in v1.4.4

func (s *AliyunLogger) Error(key string, content map[string]string)

func (*AliyunLogger) Info added in v1.4.4

func (s *AliyunLogger) Info(key string, content map[string]string)

type DefaultLogger added in v1.4.4

type DefaultLogger struct {
}

func (*DefaultLogger) Error added in v1.4.4

func (s *DefaultLogger) Error(key string, content map[string]string)

func (*DefaultLogger) Info added in v1.4.4

func (s *DefaultLogger) Info(key string, content map[string]string)

type LogData added in v1.4.4

type LogData struct {
	Level   string            `json:"level"`
	Time    string            `json:"time"`
	Key     string            `json:"key"`
	Content map[string]string `json:"content"`
}

type Logger

type Logger interface {
	Info(key string, content map[string]string)
	Error(key string, content map[string]string)
}
var LoggerObj Logger = &DefaultLogger{}

Jump to

Keyboard shortcuts

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