errorreporting

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorConfig

type ErrorConfig struct {
	ProjectID      string
	ServiceName    string
	ServiceVersion string
	OnError        func(err error)
	UseSync        bool
}

ErrorConfig is config for Google Stackdriver error repoting client.

func (ErrorConfig) Config

func (c ErrorConfig) Config() errorreporting.Config

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

Logger use Google Stackdriver error repoting.

func New

func New(ctx context.Context, errConfig ErrorConfig) (*Logger, error)

New creates initialized Logger.

func NewWithConfig

func NewWithConfig(ctx context.Context, errConfig ErrorConfig, conf config.Config) (*Logger, error)

NewWithConfig creates initialized Logger.

func (*Logger) Errorf

func (l *Logger) Errorf(service, format string, v ...interface{})

Errorf logging error information.

func (*Logger) Flush

func (l *Logger) Flush()

Flush sends buffered logs.

func (*Logger) Infof

func (*Logger) Infof(service, format string, v ...interface{})

Infof logging information.

func (*Logger) SetOnError

func (l *Logger) SetOnError(onErr func(error))

SetOnError sets OnError.

Jump to

Keyboard shortcuts

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