Originally created by: ubarar
Hi,
I'm using twitter4j to fetch user profiles in roughly the following way
ConfigurationBuilder cb = new ConfigurationBuilder();
cb.setDebugEnabled(false)
.setOAuthConsumerKey("...")
.setOAuthConsumerSecret("...")
.setOAuthAccessToken("...")
.setOAuthAccessTokenSecret("...");
Configuration c = cb.build();
System.out.println(c.isDebugEnabled()); // outputs false as expected
Twitter agent = (new TwitterFactory(c)).getAgent();
User u = twitter4j.User u = null;
...
Fetching the user succeeds, but there is a lot of debugging output, specifically from HttpClientImpl. Is this a case of misconfiguration or has anyone else also encountered this error?
Thanks
Originally posted by: igorbrigadir
Do you have a
twitter4j.propertiesfile? Could that be overriding some options maybe?Originally posted by: ubarar
@igorbrigadir nope, all the configuration happens in code as above
Originally posted by: ubarar
Ran a branch off
4.0.7and looks like it's usingSLF4JLogger- which doesn't reference the configuration at all. Gonna investigate how loggers get pickedOriginally posted by: ubarar
@igorbrigadir Got the bottom of this. Issue is there's a lot of debug output that isn't guarded by
isDebugEnabledsuch as https://github.com/Twitter4J/Twitter4J/blob/master/twitter4j-core/src/internal-http/java/twitter4j/HttpResponse.java#L95