logx

package
v1.5.20 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 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

type AliyunLogger struct {
}

func (*AliyunLogger) Error

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

func (*AliyunLogger) Info

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

type DefaultLogger

type DefaultLogger struct {
}

func (*DefaultLogger) Error

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

func (*DefaultLogger) Info

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

type LogData

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