View datapoint values
This commit is contained in:
parent
5f6a48e7e0
commit
d72694a8b4
14 changed files with 288 additions and 28 deletions
20
notification_log.go
Normal file
20
notification_log.go
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
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)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue