zapx: go.bobheadxi.dev/zapx/zgcp Index | Files

package zgcp

import "go.bobheadxi.dev/zapx/zgcp"

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

TODO: examples

Index

Package Files

doc.go gcp.go

func NewErrorReportingLogger Uses

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

type Fields Uses

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 Uses

type ServiceConfig struct {
    ProjectID string
    Name      string
    Version   string
}

ServiceConfig defines configuration for a Google Cloud Platform service

Package zgcp imports 12 packages (graph) and is imported by 1 packages. Updated 2019-08-28. Refresh now. Tools for package owners.