logs

package
v1.118.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearInfo

func ClearInfo()

func ErrorMsg

func ErrorMsg(message string)

func ErrorWithFields

func ErrorWithFields(fields map[string]interface{}, err error)

func ErrorWithMsg

func ErrorWithMsg(message string, err error)

func FilterSensitiveWordsMap

func FilterSensitiveWordsMap(s string, wordsMap map[string]bool) (filtered string, changed bool)

func Info

func Info(format string, a ...interface{})

func InfoWithFields

func InfoWithFields(fields map[string]interface{}, message interface{})

func InitLogs

func InitLogs(requestID *string, isDebugBuild bool, buildVersion string, request *events.APIGatewayProxyRequest, client *raygun4go.Client)

func LogApiAudit

func LogApiAudit(fields log.Fields)

func LogLevel

func LogLevel() log.Level

func LogRequestInfo

func LogRequestInfo(req events.APIGatewayProxyRequest)

func LogSQSEvent

func LogSQSEvent(event events.SQSEvent)

func LogShipmentID

func LogShipmentID(id int64)

func MaskPasswordsInJsonString added in v1.101.0

func MaskPasswordsInJsonString(jsonString string) string

MaskPasswordsInJsonString takes a string and, if it is a JSON string, sanitises all the password. In order for the regex to work correctly we need to prettify the JSON, so the function always returns a formatted JSON string.

func SQLDebugInfo

func SQLDebugInfo(sql string)

func SanitiseFields added in v1.101.0

func SanitiseFields(fields map[string]interface{}) map[string]interface{}

func SanitiseLogs added in v1.101.0

func SanitiseLogs(logString string) string

func SetOutputToFile

func SetOutputToFile(file *os.File)

func Warn

func Warn(format string, a ...interface{})

func WarnWithFields

func WarnWithFields(fields map[string]interface{}, err error)

Types

type Stack

type Stack struct {
	Routine int64 // go routine nr that crashed...
	Callers []errors.CallerInfo
}

func CallStack

func CallStack() Stack

Jump to

Keyboard shortcuts

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