1.1 --- a/org/sonews/feed/PullFeeder.java Wed Aug 12 13:03:23 2009 +0200
1.2 +++ b/org/sonews/feed/PullFeeder.java Fri Aug 21 17:40:54 2009 +0200
1.3 @@ -163,7 +163,7 @@
1.4 String host = "localhost";
1.5 int port = 119;
1.6
1.7 - Log.msg("Start PullFeeder run...", true);
1.8 + Log.get().info("Start PullFeeder run...");
1.9
1.10 try
1.11 {
1.12 @@ -174,14 +174,14 @@
1.13
1.14 try
1.15 {
1.16 - Log.msg("Feeding " + sub.getGroup() + " from " + sub.getHost(), true);
1.17 + Log.get().info("Feeding " + sub.getGroup() + " from " + sub.getHost());
1.18 try
1.19 {
1.20 connectTo(host, port);
1.21 }
1.22 catch(SocketException ex)
1.23 {
1.24 - Log.msg("Skipping " + sub.getHost() + ": " + ex, false);
1.25 + Log.get().info("Skipping " + sub.getHost() + ": " + ex);
1.26 continue;
1.27 }
1.28
1.29 @@ -202,13 +202,14 @@
1.30 ArticleReader aread =
1.31 new ArticleReader(sub.getHost(), sub.getPort(), messageID);
1.32 byte[] abuf = aread.getArticleData();
1.33 - if (abuf == null)
1.34 + if(abuf == null)
1.35 {
1.36 - Log.msg("Could not feed " + messageID + " from " + sub.getHost(), true);
1.37 + Log.get().warning("Could not feed " + messageID
1.38 + + " from " + sub.getHost());
1.39 }
1.40 else
1.41 {
1.42 - Log.msg("Feeding " + messageID, true);
1.43 + Log.get().info("Feeding " + messageID);
1.44 ArticleWriter awrite = new ArticleWriter(
1.45 "localhost", Config.inst().get(Config.PORT, 119));
1.46 awrite.writeArticle(abuf);
1.47 @@ -220,7 +221,7 @@
1.48 {
1.49 // There may be a temporary network failure
1.50 ex.printStackTrace();
1.51 - Log.msg("Skipping mail " + messageID + " due to exception.", false);
1.52 + Log.get().warning("Skipping mail " + messageID + " due to exception.");
1.53 }
1.54 }
1.55 } // for(;;)
1.56 @@ -236,16 +237,16 @@
1.57 catch(IOException ex)
1.58 {
1.59 ex.printStackTrace();
1.60 - Log.msg("PullFeeder run stopped due to exception.", false);
1.61 + Log.get().severe("PullFeeder run stopped due to exception.");
1.62 }
1.63 } // for(Subscription sub : subscriptions)
1.64
1.65 - Log.msg("PullFeeder run ended. Waiting " + pullInterval / 1000 + "s", true);
1.66 + Log.get().info("PullFeeder run ended. Waiting " + pullInterval / 1000 + "s");
1.67 Thread.sleep(pullInterval);
1.68 }
1.69 catch(InterruptedException ex)
1.70 {
1.71 - Log.msg(ex.getMessage(), false);
1.72 + Log.get().warning(ex.getMessage());
1.73 }
1.74 }
1.75 }