d1bc6a816f
* -- Intermediary Commit -- Just want to commit my code over the weekend, in case I spill coffee on my workstation. * Create DB models ready for write. * Handle SSE events * Update ref for stack-orchestrator * Use env in one place only. * Boot Application on PR * Update syntax * Update syntax * Correct command * Use bash instead of sh * Use until instead of while * Make linter happy and check sse subscription err * Handle Reorgs - Untested
21 lines
403 B
Go
21 lines
403 B
Go
// A simple function to help with logging errors.
|
|
package loghelper
|
|
|
|
import (
|
|
log "github.com/sirupsen/logrus"
|
|
)
|
|
|
|
// A simple helper function that will help wrap the error message.
|
|
func LogError(err error) *log.Entry {
|
|
return log.WithFields(log.Fields{
|
|
"err": err,
|
|
})
|
|
}
|
|
|
|
func LogSlotError(slot string, err error) *log.Entry {
|
|
return log.WithFields(log.Fields{
|
|
"err": err,
|
|
"slot": slot,
|
|
})
|
|
}
|