Documentation
¶
Overview ¶
Package logger provides an opinionated logger for CNS which knows how to log to Application Insights, file, stdout and ETW (based on platform).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MetadataToFields ¶ added in v1.6.33
MetadataToFields transforms Az IMDS Metadata in to zap.Field for attaching to a root zap core or logger instance. This uses the nice-names from the zapai.DefaultMappers instead of raw AppInsights key names.
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/default values and sets them if appropriate.
func (*Config) UnmarshalJSON ¶
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.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.