fix: remove logging from utils
All checks were successful
Build Docker Image / Build-Docker-Image (push) Successful in 44s
Build and Push Docker Image / Build-And-Push-Docker-Image (push) Successful in 50s

This commit was merged in pull request #292.
This commit is contained in:
2024-12-04 21:23:19 +01:00
parent 9e8e595258
commit 5198487feb
8 changed files with 74 additions and 74 deletions

26
log/default.go Normal file
View File

@@ -0,0 +1,26 @@
package log
import (
"log/slog"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
)
var (
errorMetric = promauto.NewCounter(
prometheus.CounterOpts{
Name: "mefit_error_total",
Help: "The total number of errors during processing",
},
)
)
func Error(message string, err error) {
slog.Error(message + ": " + err.Error())
errorMetric.Inc()
}
func ErrorMsg(message string) {
slog.Error(message)
errorMetric.Inc()
}