logrusld

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLogger

func GetLogger() *logrus.Logger

func Init

func Init(proto string, address string, app string) (net.Conn, error)

Types

type Hook

type Hook struct {
	sync.RWMutex

	TimeFormat string

	AsyncBufferSize          int
	WaitUntilBufferFrees     bool
	Timeout                  time.Duration // Timeout for sending message.
	MaxSendRetries           int           // Declares how many times we will try to resend message.
	ReconnectBaseDelay       time.Duration // First reconnect delay.
	ReconnectDelayMultiplier float64       // Base multiplier for delay before reconnect.
	MaxReconnectRetries      int           // Declares how many times we will try to reconnect.
	// contains filtered or unexported fields
}

func NewHook

func NewHook(protocol, address string) (*Hook, net.Conn, error)

func (*Hook) Fire

func (h *Hook) Fire(entry *logrus.Entry) error

/ Fire send message to logdoc. In async mode log message will be dropped if message buffer is full. If you want wait until message buffer frees – set WaitUntilBufferFrees to true.

func (*Hook) Levels

func (h *Hook) Levels() []logrus.Level

Jump to

Keyboard shortcuts

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