logging

package
v1.9.0-beta.13 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogger

func NewLogger(config Config) *logrus.Logger

func NewLogstashClient added in v1.7.0

func NewLogstashClient(config LogstashConfig) (*net.UDPConn, error)

Types

type Config

type Config struct {
	Service  ServiceConfig
	Logstash *LogstashConfig
}

type LogstashConfig added in v1.7.0

type LogstashConfig struct {
	Host string
	Port int
}

type LogstashHook added in v1.7.0

type LogstashHook struct {
	// contains filtered or unexported fields
}

func NewLogstashHook added in v1.7.0

func NewLogstashHook(conn *net.UDPConn, addr *net.UDPAddr) *LogstashHook

func (*LogstashHook) Fire added in v1.7.0

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

func (*LogstashHook) Levels added in v1.7.0

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

type ServiceConfig

type ServiceConfig struct {
	Env     string
	AppName string
}

type ServiceHook

type ServiceHook struct {
	Env     string
	Service string
}

func NewServiceHook

func NewServiceHook(config ServiceConfig) *ServiceHook

func (*ServiceHook) Fire

func (s *ServiceHook) Fire(entry *logrus.Entry) error

func (*ServiceHook) Levels

func (s *ServiceHook) Levels() []logrus.Level

Jump to

Keyboard shortcuts

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