22 lines
692 B
Go
22 lines
692 B
Go
package logger
|
|
|
|
import (
|
|
"fmt"
|
|
"jannex/robot-control-manager/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: "robots",
|
|
Logs: []string{"I " + rslogger.GetTime() + fmt.Sprintf(format, v...)}})
|
|
}
|
|
|
|
func AddRexLog(format string, v ...any) {
|
|
go rslogger.LogManagerRequestClient(fiber.MethodPost, config.Cfg.LogManagerServerUrl+"/v1/log", rslogger.LogManagerRequestBody{
|
|
Type: "rex",
|
|
Logs: []string{"I " + rslogger.GetTime() + fmt.Sprintf(format, v...)}})
|
|
}
|