logger

package
v0.0.0-...-97c8bc0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg *Config) (*zap.Logger, error)

Types

type Config

type Config struct {
	Development bool           `koanf:"development"`
	Loggers     []LoggerType   `koanf:"loggers"`
	Graylog     *GraylogConfig `koanf:"graylog"`
	Sentry      *SentryConfig  `koanf:"sentry"`
}

type GraylogConfig

type GraylogConfig struct {
	URI      string `koanf:"uri"`
	Facility string `koanf:"facility"`
}

type LoggerType

type LoggerType string
const (
	StandardLogger LoggerType = "std"
	GraylogLogger  LoggerType = "graylog"
	SentryLogger   LoggerType = "sentry"
)

type SentryConfig

type SentryConfig struct {
	URI  string            `koanf:"uri"`
	Tags map[string]string `koanf:"tags"`
}

Jump to

Keyboard shortcuts

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