gcp

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2020 License: MIT Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// CallerSkipFrameCount is the number of stack frames to skip to find the caller.
	CallerSkipFrameCount = 3
)

Variables

View Source
var LevelToSeverity = func(level zerolog.Level) string {
	switch level {
	case zerolog.NoLevel:
		return "Default"
	case zerolog.DebugLevel:
		return "Debug"

	case zerolog.WarnLevel:
		return "Warning"
	case zerolog.ErrorLevel:
		return "Error"
	case zerolog.FatalLevel:
		return "Alert"
	case zerolog.PanicLevel:
		return "Emergency"
	default:
		return "Info"
	}
}

LevelToSeverity converts a zerolog level to the stackdriver severity Stackdriver has more levels than zerolog so we skip some severities. By default we set info when no level is provided.

Functions

This section is empty.

Types

type CallerHook

type CallerHook struct{}

callerHook implements zerolog.Hook interface.

func (CallerHook) Run

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

Run adds sourceLocation for the log to zerolog.Event.

type StackdriverSeverityHook

type StackdriverSeverityHook struct{}

func (StackdriverSeverityHook) Run

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

Jump to

Keyboard shortcuts

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