Code Monkey home page Code Monkey logo

Comments (4)

eht16 avatar eht16 commented on June 30, 2024

This is exactly what this handler aims to do.
On network errors (like when no listeners running) the events are queued and re-sent later as long as the events could be delivered successfully. Currently there is no backoff logic but it could be implemented.

Did you experience loss of events due to transmission problems?

from python-logstash-async.

jesusch avatar jesusch commented on June 30, 2024

problem occured to me when I run this handler while there is no destination listening (immediately)

from python-logstash-async.

jesusch avatar jesusch commented on June 30, 2024

here is my sample logging script: https://gist.github.com/jesusch/6283670bbd294a0a16525c01a0253bd3
and here is the console output of running it: https://gist.github.com/jesusch/a7a86083c6ca2cdf0699d7978b172a67

from python-logstash-async.

eht16 avatar eht16 commented on June 30, 2024

This is as expected:
the handler tries to send the events and if it fails, the events are queued in the SQLite database.
Every QUEUED_EVENTS_FLUSH_INTERVAL seconds or every QUEUED_EVENTS_FLUSH_COUNT events (https://github.com/eht16/python-logstash-async/blob/master/logstash_async/constants.py#L19) resending is tried (the new events as well as the events queued in the database).

You should find the events in the database and they will be re-sent once you restart your test application.

I guess there is just a misunderstanding in the behavior:
the handler will not keep the application running until the events could be delivered successfully. This is out of scope of a logging handler. However the handler performs a last transmission attempt on exit (i.e. if the logging subsystem is shutdown).

from python-logstash-async.

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.