21 lines
594 B
Go
21 lines
594 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
// Internal
|
||
|
"smon/notification"
|
||
|
// Standard
|
||
|
)
|
||
|
|
||
|
func notificationLog(notificationService *notification.Service, problemID int, err error) {
|
||
|
if err == nil {
|
||
|
logger.Info("notification", "service", (*notificationService).GetType(), "problemID", problemID, "prio", (*notificationService).GetPrio(), "ok", true)
|
||
|
service.Db.Conn.Query(
|
||
|
`
|
||
|
INSERT INTO notification_send()
|
||
|
`,
|
||
|
)
|
||
|
} else {
|
||
|
logger.Error("notification", "service", (*notificationService).GetType(), "problemID", problemID, "prio", (*notificationService).GetPrio(), "ok", false, "error", err)
|
||
|
}
|
||
|
}
|