22 lines
708 B
Go
22 lines
708 B
Go
package logger
|
|
|
|
import (
|
|
"fmt"
|
|
"jannex/admin-dashboard-backend/modules/config"
|
|
|
|
"git.ex.umbach.dev/Alex/roese-utils/rslogger"
|
|
"github.com/gofiber/fiber/v2"
|
|
)
|
|
|
|
func AddSystemLog(format string, v ...any) {
|
|
go rslogger.LogManagerRequestClient(fiber.MethodPost, config.Cfg.LogManagerServerUrl+"/v1/log", rslogger.LogManagerRequestBody{
|
|
Type: "system",
|
|
Logs: []string{"I " + rslogger.GetTime() + fmt.Sprintf(format, v...)}})
|
|
}
|
|
|
|
func AddGroupTasksLog(format string, v ...any) {
|
|
go rslogger.LogManagerRequestClient(fiber.MethodPost, config.Cfg.LogManagerServerUrl+"/v1/log", rslogger.LogManagerRequestBody{
|
|
Type: "grouptasks",
|
|
Logs: []string{"I " + rslogger.GetTime() + fmt.Sprintf(format, v...)}})
|
|
}
|