Skip to content

Instantly share code, notes, and snippets.

@marcoberri
Created September 9, 2015 08:26
Show Gist options
  • Select an option

  • Save marcoberri/ddfc87a8bd0bcb3b90c3 to your computer and use it in GitHub Desktop.

Select an option

Save marcoberri/ddfc87a8bd0bcb3b90c3 to your computer and use it in GitHub Desktop.
Retrofint and Log4J
public class ExampleLog4J implements RestAdapter.Log {
private static final Logger logger = logger.getLogger(ExampleLogger.class)
ExampleLog4J(){ }
@Override
public void log(String message) {
log.info("Retrofit# "+message);
}
}
new RestAdapter.Builder().setLog(new ExampleLog4J())...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment