You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

Michal5's avatar
Michal5
Explorer | Level 4
5 years ago

Enable logging dropbox sdk java

Hi. I would like to know whether it is possible enable logging for all request and response data. I am using dropbox sdk java. In some cases, it can be useful to see the exact requests and response...
  • Greg-DB's avatar
    5 years ago

    The Dropbox Java SDK itself doesn't have methods for enabling logging, but if you're using the StandardHttpRequestor (the default) you can enable logging output like this:

     

    Logger.getLogger("").setLevel(Level.ALL);
    final java.util.logging.ConsoleHandler consoleHandler = new java.util.logging.ConsoleHandler();
    consoleHandler.setLevel(Level.ALL);
    Logger.getLogger("").addHandler(consoleHandler);