Menu

#309 Debug output even when disabled through configuration (4.0.7)

open
nobody
None
2019-02-15
2019-02-13
Anonymous
No

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

Discussion

  • Anonymous

    Anonymous - 2019-02-14

    Originally posted by: igorbrigadir

    Do you have a twitter4j.properties file? Could that be overriding some options maybe?

     
  • Anonymous

    Anonymous - 2019-02-14

    Originally posted by: ubarar

    @igorbrigadir nope, all the configuration happens in code as above

     
  • Anonymous

    Anonymous - 2019-02-15

    Originally posted by: ubarar

    Ran a branch off 4.0.7 and looks like it's using SLF4JLogger - which doesn't reference the configuration at all. Gonna investigate how loggers get picked

     

Log in to post a comment.