logging

package
v0.0.0-...-0ec1176 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientError

func ClientError(ls LogStruct, err string)

for errors caused by the client protocol: name of the specific rpc endpoint (SaveListings, CullListings, etc)

func ClientWarning

func ClientWarning(ls LogStruct, err string)

func InfoTail

func InfoTail(ls LogStruct, message string)

same as Info() except must be called at end of the rpc using the output returned from Info()

func InternalError

func InternalError(ls LogStruct, err error)

for internal server errors protocol: name of the specific rpc endpoint (SaveListings, CullListings, etc)

Types

type LogStruct

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

func Info

func Info(protocol string, ctx context.Context, message string) LogStruct
call this function at the beginning of each rpc. It takes in the context and logs the client address

protocol: name of the specific rpc endpoint (SaveListings, CullListings, etc) message: info about the request

Jump to

Keyboard shortcuts

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