logger

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 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         `required:"true"`
	Loggers     []LoggerType `required:"true"`
	Graylog     *GraylogConfig
	Sentry      *SentryConfig
}

type GraylogConfig

type GraylogConfig struct {
	URI      string `required:"true"`
	Facility string `required:"true"`
}

type LoggerType

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

type SentryConfig

type SentryConfig struct {
	URI  string `required:"true"`
	Tags map[string]string
}

Jump to

Keyboard shortcuts

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