zgcp

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package zgcp provides log extensions and hooks for Google Cloud Platform services.

TODO: examples

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewErrorReportingLogger

func NewErrorReportingLogger(
	l *zap.Logger,
	service ServiceConfig,
	fields Fields,
	debug bool,
	opts ...option.ClientOption,
) (*zap.Logger, error)

NewErrorReportingLogger attaches the GCP Stackdriver Error Reporting client to the given zap logger. See https://cloud.google.com/error-reporting

Types

type Fields

type Fields struct {
	UserKey    string
	RequestKey string
}

Fields defines special fields to parse out of a set of Zap fields. If empty, then will be ignored.

type ServiceConfig

type ServiceConfig struct {
	ProjectID string
	Name      string
	Version   string
}

ServiceConfig defines configuration for a Google Cloud Platform service

Jump to

Keyboard shortcuts

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