Log number of Sones that will be loaded.
[Sone.git] / src / main / java / net / pterodactylus / sone / core / Core.java
index 3399e9c..00bbed0 100644 (file)
@@ -136,11 +136,12 @@ public class Core extends AbstractService {
                }
 
                /* parse local Sones. */
+               logger.log(Level.INFO, "Loading %d Sones…", allSoneNames.size());
                for (String soneName : allSoneNames) {
                        String insertUri = configuration.getStringValue("Sone/Name." + soneName + "/InsertURI").getValue(null);
                        String requestUri = configuration.getStringValue("Sone/Name." + soneName + "/RequestURI").getValue(null);
                        try {
-                               localSones.add(new Sone(new FreenetURI(requestUri), new FreenetURI(insertUri)));
+                               localSones.add(new Sone(soneName, new FreenetURI(requestUri), new FreenetURI(insertUri)));
                        } catch (MalformedURLException mue1) {
                                logger.log(Level.WARNING, "Could not create Sone from requestUri (“" + requestUri + "”) and insertUri (“" + insertUri + "”)!", mue1);
                        }