log

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GRPC

func GRPC(logger *zap.Logger) logging.Logger

func MustNewZapSystem

func MustNewZapSystem() *zap.Logger

func NewZap

func NewZap(opts ...Option) (*zap.Logger, *zap.AtomicLevel, error)

func NewZapTest added in v0.5.0

func NewZapTest(t *testing.T) *zap.Logger

Types

type Config

type Config struct {
	Format          string `validate:"oneof=json console"`
	Level           string `validate:"oneof=debug info warn error"`
	EnableCaller    bool   `yaml:"enable_caller"`
	EnableTraceback bool   `yaml:"enable_traceback"`
}

func (Config) Validate

func (obj Config) Validate() error

type Option

type Option = c.Option[Config]

func WithFormat

func WithFormat(format string) Option

func WithLevel

func WithLevel(level string) Option

Jump to

Keyboard shortcuts

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