Git Product home page Git Product logo

Comments (4)

peterbourgon avatar peterbourgon commented on May 14, 2024 2

That's fine, but then you'll want to use another log forwarding tool like svlogd — oklog forward will never be in the business of managing files on disk.

from oklog.

peterbourgon avatar peterbourgon commented on May 14, 2024 1

No reason to bring in a dependency for this. My intuition is that a custom little ringbuffer should work fine. Happy to consider anything you come up with, though.

from oklog.

laher avatar laher commented on May 14, 2024

Interesting.

The standard library 'ring' package https://golang.org/pkg/container/ring/ seems a little overkill for a byte slice.

Something akin to this might be a more straightforward fit https://github.com/armon/circbuf/blob/master/circbuf.go . Prolly needs a mutex though.

If I find time I'll have a play and send a PR.

From there I'd love to expose a function to forward programatically in-app ... one step at a time eh.
Cheers.

from oklog.

newhook avatar newhook commented on May 14, 2024

An option that I think I'd want to use in our production systems is neither backpressure (I don't want to slow down our workers due to what I hope is a temporary slowdown in ingestion rate) nor drop log lines but instead locally buffer the data on the local file system.

from oklog.

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.