Added WriteTimeout (100ms)
This commit is contained in:
@@ -3,6 +3,7 @@ package fluentd
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/fluent/fluent-logger-golang/fluent"
|
"github.com/fluent/fluent-logger-golang/fluent"
|
||||||
)
|
)
|
||||||
@@ -16,7 +17,7 @@ func NewLogger(appName, fHost string, fPort int) (*Logger, error) {
|
|||||||
config := fluent.Config{
|
config := fluent.Config{
|
||||||
FluentHost: fHost,
|
FluentHost: fHost,
|
||||||
FluentPort: fPort,
|
FluentPort: fPort,
|
||||||
// WriteTimeout: -1,
|
WriteTimeout: 100 * time.Millisecond,
|
||||||
}
|
}
|
||||||
fluent, err := fluent.New(config)
|
fluent, err := fluent.New(config)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user