Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(level, env, driver string, brokers []string, topic, rabbitURL, rabbitQueue, filePath string) *logrus.Logger
New creates a JSON structured logger at the specified level. Logs are sent to Kafka only when env is "production" and brokers are configured. New creates a JSON structured logger at the specified level. MQ driver can be "kafka" or "rabbitmq". File logging is enabled when env is not "production" and filePath is provided (or defaulted).
Types ¶
type KafkaHook ¶
type KafkaHook struct {
// contains filtered or unexported fields
}
New creates a JSON structured logger at the specified level.
type RabbitMQHook ¶
type RabbitMQHook struct {
// contains filtered or unexported fields
}
func (*RabbitMQHook) Levels ¶
func (h *RabbitMQHook) Levels() []logrus.Level
Click to show internal directories.
Click to hide internal directories.