MCPcopy
hub / github.com/spacecloud-io/space-cloud / LogError

Function LogError

space-cli/cmd/utils/log.go:11–22  ·  view source on GitHub ↗

LogError logs the error in the proper format

(message string, err error)

Source from the content-addressed store, hash-verified

9
10// LogError logs the error in the proper format
11func LogError(message string, err error) error {
12
13 // Log with error if provided
14 if err != nil {
15 logrus.WithField("error", err.Error()).Errorln(message)
16 } else {
17 logrus.Errorln(message)
18 }
19
20 // Return the error message
21 return errors.New(message)
22}
23
24// LogInfo logs te info message in the proper format
25func LogInfo(message string) {

Callers 9

GetFunction · 0.85
GenerateAccountsFileFunction · 0.85
SetDefaultProjectFunction · 0.85
loginFunction · 0.85
LoginStartFunction · 0.85
CheckPortAvailabilityFunction · 0.85
SetLogLevelFunction · 0.85
GetContainersFunction · 0.85

Calls 1

ErrorMethod · 0.65

Tested by

no test coverage detected