Comments (3)
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.
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.
@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)
- GetTweetsLookupByIds fails when passing the map parameter
- GetListsOwnedBy cursor implementation
- Get all members for a given list HOT 2
- Improve documentation
- Panic when trying to get an AuthorizationURL HOT 1
- App Engine Deploy can't find import: "github.com/dustin/gojson" HOT 3
- wo get x509: certificate error
- I can't solve the error: invalid or expired token HOT 2
- How to filter stream based on language and a slice fo strings? HOT 1
- EnableThrottling for GetFollowersIdsAll HOT 1
- Account Activity API support HOT 2
- How to subscribe some users realtime tweets? HOT 3
- Update to newer oauth library
- New DM API HOT 2
- authorization URL
- The field `reply_count` is not included in `anaconda.Tweet`.
- App-only auth HOT 1
- geo HOT 1
- I want to detect that a twitter user is tweeting. HOT 1
- POST friendships/update (/1.1/friendships/update.json)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from anaconda.