Giter Club home page Giter Club logo

Comments (3)

ChimeraCoder avatar ChimeraCoder commented on May 13, 2024

Yeah, I've actually been thinking about adding (optionally) better logging in general. The trick is that we don't want to pollute people's logs when they don't want this, so it has to be optional. The straightforward way is to have a logger that only outputs values if a certain flag is set. This is an interface that's pretty easy to implement wrapping the stdlib's logger.

Another option is to use a channel that can feed on logging values emitted by the API client. This is similar to what Go lexers (including the template package, IIRC) do. There are some advantages to doing this, but it may be overkill here, especially if this is the only place that this sort of logging is needed.

Could you elaborate a bit more on the use case here (the specific problem you're running into, in which the headers would be helpful)? That may help us to figure out the best way to add this while maintaining the same interface for API calls that people are used to.

from anaconda.

harlow avatar harlow commented on May 13, 2024

OK sounds good. Thanks for the quick reply.

Could you elaborate a bit more on the use case here (the specific problem you're running into, in which the headers would be helpful)?

I was thinking it would be nice to have access to the rate limit information (for successful queries too). As I think about it some more though the Throttling functionality should suffice, and then we could log when we hit our limits.

from anaconda.

ChimeraCoder avatar ChimeraCoder commented on May 13, 2024

@harlow This is fixed, as of bdb4b76. I didn't realize how simple it would be; I forgot we already had the logger from the streaming API (which is separate on Twitter's end, but included in this library).

Let me know if this satisfies what you're looking for - at this point, it'd be easy to tweak it as needed.

from anaconda.

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.