logger

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2021 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

View Source
const (
	GCPAlertLevel    severityGCP = "ALERT"
	GCPCriticalLevel severityGCP = "CRITICAL"
	GCPErrorLevel    severityGCP = "ERROR"
	GCPWarningLevel  severityGCP = "WARNING"
	GCPInfoLevel     severityGCP = "INFO"
	GCPDebugLevel    severityGCP = "DEBUG"

	GCPFieldKeySeverity = "severity"
	GCPFieldKeyMsg      = "message"
	GCPFieldKeyTime     = "time"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LevelDecoder

type LevelDecoder zerolog.Level

LogLevelDecoder deserializes the log level from a config string.

func (*LevelDecoder) Decode

func (ll *LevelDecoder) Decode(value string) error

Decode implements envconfig.Decoder

type SeverityHook

type SeverityHook struct{}

SeverityHook adds GCP severity levels to zerolog output log messages.

func (SeverityHook) Run

func (h SeverityHook) Run(e *zerolog.Event, level zerolog.Level, msg string)

Run implements the zerolog.Hook interface.

Jump to

Keyboard shortcuts

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