Documentation ¶
Index ¶
- Constants
- func Debug(msg string, fields map[string]interface{})
- func Error(msg string, fields map[string]interface{})
- func Fatal(msg string, fields map[string]interface{})
- func Info(msg string, fields map[string]interface{})
- func SetLogLevel(level string)
- func SetLogger(logger Logger)
- func SetOutputPath(path string) (err error)
- func Warning(msg string, fields map[string]interface{})
- type Config
- type Logger
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 SetLogLevel ¶
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 ¶
Types ¶
type Config ¶
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) }
Click to show internal directories.
Click to hide internal directories.