rlog

package
v2.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2023 License: Apache-2.0 Imports: 5 Imported by: 102

Documentation

Index

Constants

View Source
const (
	LogKeyProducerGroup        = "producerGroup"
	LogKeyConsumerGroup        = "consumerGroup"
	LogKeyTopic                = "topic"
	LogKeyMessageQueue         = "MessageQueue"
	LogKeyAllocateMessageQueue = "AllocateMessageQueue"
	LogKeyUnderlayError        = "underlayError"
	LogKeyBroker               = "broker"
	LogKeyValueChangedFrom     = "changedFrom"
	LogKeyValueChangedTo       = "changeTo"
	LogKeyPullRequest          = "PullRequest"
	LogKeyTimeStamp            = "timestamp"
	LogKeyMessageId            = "msgId"
	LogKeyStoreHost            = "storeHost"
	LogKeyQueueId              = "queueId"
	LogKeyQueueOffset          = "queueOffset"
	LogKeyMessages             = "messages"
)

Variables

This section is empty.

Functions

func Debug

func Debug(msg string, fields map[string]interface{})

func Error

func Error(msg string, fields map[string]interface{})

func Fatal

func Fatal(msg string, fields map[string]interface{})

func Info

func Info(msg string, fields map[string]interface{})

func SetLogLevel added in v2.1.0

func SetLogLevel(level string)

func SetLogger

func SetLogger(logger Logger)

SetLogger use specified logger user customized, in general, we suggest user to replace the default logger with specified

func SetOutputPath added in v2.1.0

func SetOutputPath(path string) (err error)

func Warning

func Warning(msg string, fields map[string]interface{})

Types

type Config added in v2.1.1

type Config struct {
	OutputPath    string
	MaxFileSizeMB int
	MaxBackups    int
	MaxAges       int
	Compress      bool
	LocalTime     bool
}

func (*Config) Logger added in v2.1.1

func (c *Config) Logger() *lumberjack.Logger

type Logger

type Logger interface {
	Debug(msg string, fields map[string]interface{})
	Info(msg string, fields map[string]interface{})
	Warning(msg string, fields map[string]interface{})
	Error(msg string, fields map[string]interface{})
	Fatal(msg string, fields map[string]interface{})
	Level(level string)
	OutputPath(path string) (err error)
}

Jump to

Keyboard shortcuts

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