Add output when a Sone was successfully parsed
[Sone.git] / src / main / java / net / pterodactylus / sone / core / SoneDownloaderImpl.java
index 91bf13b..ba1c632 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Sone - SoneDownloaderImpl.java - Copyright © 2010–2016 David Roden
+ * Sone - SoneDownloaderImpl.java - Copyright © 2010–2019 David Roden
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -62,7 +62,7 @@ public class SoneDownloaderImpl extends AbstractService implements SoneDownloade
        private final FreenetInterface freenetInterface;
 
        /** The sones to update. */
-       private final Set<Sone> sones = new HashSet<Sone>();
+       private final Set<Sone> sones = new HashSet<>();
 
        @Inject
        SoneDownloaderImpl(UpdatedSoneProcessor updatedSoneProcessor, FreenetInterface freenetInterface, SoneParser soneParser) {
@@ -191,6 +191,7 @@ public class SoneDownloaderImpl extends AbstractService implements SoneDownloade
                        Sone parsedSone = soneParser.parseSone(originalSone,
                                        soneInputStream);
                        if (parsedSone != null) {
+                               logger.log(Level.FINER, "Sone %s was successfully parsed.", parsedSone);
                                parsedSone.setLatestEdition(requestUri.getEdition());
                        }
                        return parsedSone;