logging

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: May 13, 2025 License: Apache-2.0 Imports: 10 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 NewOpenSearchClient added in v1.1.10

func NewOpenSearchClient(config OpenSearchConfig) (*opensearch.Client, error)

Types

type Config

type Config struct {
	Service    ServiceConfig
	OpenSearch *OpenSearchConfig
}

type OpenSearchConfig added in v1.1.10

type OpenSearchConfig struct {
	Addresses []string
	Username  string
	Password  string
	Index     string
}

type OpenSearchHook added in v1.1.10

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

func NewOpenSearchHook added in v1.1.10

func NewOpenSearchHook(client *opensearch.Client, index string) *OpenSearchHook

func (*OpenSearchHook) Fire added in v1.1.10

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

func (*OpenSearchHook) Levels added in v1.1.10

func (h *OpenSearchHook) 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