From 8c150add431f5ad9be31f01bef540b42f7656550 Mon Sep 17 00:00:00 2001 From: alex Date: Sun, 8 Oct 2023 12:57:19 +0200 Subject: [PATCH] logger --- rslogger/rslogger.go | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/rslogger/rslogger.go b/rslogger/rslogger.go index f29a4a2..0cb51ab 100644 --- a/rslogger/rslogger.go +++ b/rslogger/rslogger.go @@ -2,7 +2,6 @@ package rslogger import ( "encoding/json" - "fmt" "os" "time" @@ -31,24 +30,10 @@ func InitLogger(debug bool, colorizedOutput bool, logManagerServerUrl string) { } } -func getTime() string { +func GetTime() string { return time.Now().Format("15:04:05 02-01-2006") + " " } -func AddSystemLog(format string, v ...any) { - log.Info().Msgf("used log manager server url: %s", usedLogManagerServerUrl) - - go LogManagerRequestClient(fiber.MethodPost, usedLogManagerServerUrl+"/v1/log", LogManagerRequestBody{ - Type: "system", - Logs: []string{"I " + getTime() + fmt.Sprintf(format, v...)}}) -} - -func AddGroupTasksLog(format string, v ...any) { - go LogManagerRequestClient(fiber.MethodPost, usedLogManagerServerUrl+"/v1/log", LogManagerRequestBody{ - Type: "grouptasks", - Logs: []string{"I " + getTime() + fmt.Sprintf(format, v...)}}) -} - type LogManagerRequestBody struct { Type string Logs []string