logger

package
v1.6.24 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2025 License: MIT 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, func(), error)

Types

type Config

type Config struct {
	// Level is the general logging Level. If cores have more specific config it will override this.
	Level string `json:"level"`

	AppInsights *cores.AppInsightsConfig `json:"appInsights,omitempty"`
	File        *cores.FileConfig        `json:"file,omitempty"`
	// contains filtered or unexported fields
}

func (*Config) Normalize

func (c *Config) Normalize()

Normalize checks the Config for missing or illegal values and sets them to defaults if appropriate.

func (*Config) UnmarshalJSON

func (c *Config) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler for the Config. It only differs from the default by parsing the Level string into a zapcore.Level and setting the level field.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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