logger

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ctx added in v0.7.13

func Ctx(ctx context.Context) *zap.Logger

func InitLogger

func InitLogger(cfg Config) *log.Zap

Types

type Config

type Config struct {
	// log level - debug, info, warning, error, fatal
	Level string `yaml:"level" mapstructure:"level" default:"info" json:"level,omitempty"`

	// format strategy - plain, json
	Format string `yaml:"format" mapstructure:"format" default:"json" json:"format,omitempty"`

	// audit system events - none(default), stdout, db
	AuditEvents string `yaml:"audit_events" mapstructure:"audit_events" default:"none" json:"audit_events,omitempty"`

	// IgnoredAuditEvents contains list of events which should be ignored in audit logs
	IgnoredAuditEvents []string `yaml:"ignored_audit_events" mapstructure:"ignored_audit_events" json:"ignored_audit_events,omitempty"`
}

Jump to

Keyboard shortcuts

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