MCPcopy Create free account
hub / github.com/cronitorio/cronitor-cli / log

Function log

cmd/root.go:403–414  ·  view source on GitHub ↗
(msg string)

Source from the content-addressed store, hash-verified

401}
402
403func log(msg string) {
404 debugLog := viper.GetString(varLog)
405 if len(debugLog) > 0 {
406 f, _ := os.OpenFile(debugLog, os.O_APPEND|os.O_WRONLY|os.O_CREATE, 0644)
407 defer f.Close()
408 f.WriteString(msg + "\n")
409 }
410
411 if verbose {
412 fmt.Println(msg)
413 }
414}
415
416func fatal(msg string, exitCode int) {
417 debugLog := viper.GetString(varLog)

Callers 15

status.goFile · 0.85
RunCommandFunction · 0.85
shipLogDataFunction · 0.85
FullNameMethod · 0.85
GetNextRunFromMonitorKeyFunction · 0.85
initConfigFunction · 0.85
sendPingFunction · 0.85
printSuccessTextFunction · 0.85
printDoneTextFunction · 0.85
printWarningTextFunction · 0.85
printErrorTextFunction · 0.85

Calls 1

CloseMethod · 0.80

Tested by

no test coverage detected