Git Product home page Git Product logo

Comments (3)

fgsl avatar fgsl commented on July 28, 2024

In addition, I tried to make a short program, to write only one message, but the result was the same:

Opening Fluentd connection...
fluent#write: failed to reconnect, max retry: 0
Closing Fluentd connection...

from fluent-logger-golang.

tagomoris avatar tagomoris commented on July 28, 2024

That looks weird. As far as I checked with my code, the MaxRetry is configured correctly.

package main

import (
	"fmt"

	"github.com/fluent/fluent-logger-golang/fluent"
)

func main() {
	logger, _ := fluent.New(fluent.Config{FluentPort: 24224, FluentHost: "127.0.0.1", MaxRetry: 13})
	fmt.Println("MaxRetry is", logger.Config.MaxRetry)
	kv := make(map[string]string)
	kv["key"] = "value"
	logger.Post("yay", kv)
}

The console output from this code is:

$ date; go run fluenttest.go
Tue Oct 13 22:52:09 JST 2020
MaxRetry is 13

This code blocks while retrying as expected. If I launch Fluentd after this execution, it can receive the message.
So, I can't reproduce the case you posted.

from fluent-logger-golang.

fgsl avatar fgsl commented on July 28, 2024

Well, I gave up and replaced the program by a version in Python. Now, it's sending logs.

from fluent-logger-golang.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.