Sunday, June 28, 2009

Dumpcatcher: Java Client

I'm on my way back from Cambodia... More on that later...

After spending about two-three hours working on hmac signing with Java I now have a working Dumpcatcher client for Java, this is similar to the python client

clients/python/logging/handler.py:Dumpcatcher
in that its usage is:
Dumpcatcher dc = new Dumpcatcher(PRODUCT_KEY, SECRET, "http://localhost:8080/add", 2);
HttpResponse response = dc.sendCrash(
    new NameValuePair("short", "Some short dump"),
    new NameValuePair("long", "some long dump")
)
    assertNotNull(response);
    assertEquals(200, response.getStatusLine().getStatusCode());

Have a look: http://code.google.com/p/dumpcatcher/source/browse/clients/java/src/com/googlecode/dumpcatcher/logging/Dumpcatcher.java?r=20090629r0

Now onto making a logging client for this guy.