sawmill

package module
v1.0.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2020 License: MIT Imports: 7 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	// The Logger
	GoogleLogger *logging.Logger
	// If their was an error with the initialization, it won't log to the cloud
	InitError bool
	// The service that logging was created for
	ServiceName string
	// contains filtered or unexported fields
}

Logger holds the newly generated error logging client, so that it can be used for our own, more simple custom logging functions instead of the ones the Google provides

func InitClient

func InitClient(projectID string, credentialsJSON string, environment string, serviceName string) (Logger, error)

InitClient creates a logging client

func (Logger) Log

func (c Logger) Log(operation string, msg string)

Log Just logs a standalone message to the console

func (Logger) LogErr

func (c Logger) LogErr(operation string, err error, req *http.Request)

LogErr logs an error

Jump to

Keyboard shortcuts

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