f5a8c5a45d
Signed-off-by: Michael Mayer <michael@photoprism.app>
21 lines
402 B
Go
21 lines
402 B
Go
package api
|
|
|
|
import (
|
|
"github.com/photoprism/photoprism/internal/event"
|
|
)
|
|
|
|
var log = event.Log
|
|
|
|
// logError logs an error if err is not nil.
|
|
func logError(prefix string, err error) {
|
|
if err != nil {
|
|
log.Errorf("%s: %s", prefix, err.Error())
|
|
}
|
|
}
|
|
|
|
// logWarn logs a warning if err is not nil.
|
|
func logWarn(prefix string, err error) {
|
|
if err != nil {
|
|
log.Warnf("%s: %s", prefix, err.Error())
|
|
}
|
|
}
|