Added Ping method to the logger class

This commit is contained in:
2025-10-12 17:53:37 +02:00
parent 53e2d49e36
commit 69797a214f

View File

@@ -1,6 +1,7 @@
package fluentd
import (
"errors"
"fmt"
"log"
@@ -36,6 +37,14 @@ func (l *Logger) Log(format string, v ...any) {
}
}
func (l *Logger) Ping() error {
if l.fluent.RequestAck {
return nil
}
return errors.New("Logger service is unavailable")
}
func (l *Logger) Close() error {
return l.fluent.Close()
}