From: David ‘Bombe’ Roden Date: Tue, 12 Oct 2010 14:53:50 +0000 (+0200) Subject: Add logging. X-Git-Tag: 0.1-RC1~531 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=aaba08b539df7fb8db17f16d6802e31fb5f3bfaa;p=Sone.git Add logging. --- diff --git a/src/main/java/net/pterodactylus/sone/core/FreenetInterface.java b/src/main/java/net/pterodactylus/sone/core/FreenetInterface.java index 8f9ec8f..5d0a1a2 100644 --- a/src/main/java/net/pterodactylus/sone/core/FreenetInterface.java +++ b/src/main/java/net/pterodactylus/sone/core/FreenetInterface.java @@ -69,12 +69,16 @@ public class FreenetInterface extends AbstractService { * @return The result of the fetch, or {@code null} if an error occured */ public FetchResult fetchUri(FreenetURI uri) { + logger.entering(FreenetInterface.class.getName(), "fetchUri(FreenetURI)", uri); + FetchResult fetchResult = null; try { - return client.fetch(uri); + fetchResult = client.fetch(uri); } catch (FetchException fe1) { logger.log(Level.WARNING, "Could not fetch “" + uri + "”!", fe1); - return null; + } finally { + logger.exiting(FreenetInterface.class.getName(), "fetchUri(FreenetURI)", fetchResult); } + return fetchResult; } }