package logger

import (
	"fmt"

	"git.ex.umbach.dev/Alex/roese-utils/rslogger"
	"github.com/gofiber/fiber/v2"
)

func AddSystemLog(format string, v ...any) {
	go rslogger.LogManagerRequestClient(fiber.MethodPost, rslogger.LogManagerRequestBody{
		Type: "robot-control-manager",
		Logs: []string{"I " + rslogger.GetTime() + fmt.Sprintf(format, v...)}})
}

func AddRexLog(rexId, format string, v ...any) {
	go rslogger.LogManagerRequestClient(fiber.MethodPost, rslogger.LogManagerRequestBody{
		Type: "rex-" + rexId,
		Logs: []string{"I " + rslogger.GetTime() + fmt.Sprintf(format, v...)}})
}
