Compare commits

...

2 Commits

Author SHA1 Message Date
e16021ee49 Added Ping method to the logger class 2025-10-12 19:17:17 +02:00
69797a214f Added Ping method to the logger class 2025-10-12 17:53:37 +02:00

View File

@@ -36,6 +36,18 @@ func (l *Logger) Log(format string, v ...any) {
} }
} }
func (l *Logger) Ping() error {
mapData := map[string]string{
"message": "Checking is Fluentd alive",
}
err := l.fluent.Post(l.appName, mapData)
if err != nil {
return err
}
return nil
}
func (l *Logger) Close() error { func (l *Logger) Close() error {
return l.fluent.Close() return l.fluent.Close()
} }