org/sonews/mlgw/Dispatcher.java
changeset 16 5a4a41cfc0a3
parent 14 efce4ec25564
     1.1 --- a/org/sonews/mlgw/Dispatcher.java	Thu Aug 20 18:41:21 2009 +0200
     1.2 +++ b/org/sonews/mlgw/Dispatcher.java	Thu Aug 20 21:31:03 2009 +0200
     1.3 @@ -115,7 +115,7 @@
     1.4      }
     1.5      else if(fallback)
     1.6      {
     1.7 -      Log.msg("Using fallback recipient discovery for: " + msg.getSubject(), true);
     1.8 +      Log.get().info("Using fallback recipient discovery for: " + msg.getSubject());
     1.9        groups = new ArrayList<String>();
    1.10        // Fallback to TO/CC/BCC addresses
    1.11        Address[] to = msg.getAllRecipients();
    1.12 @@ -181,7 +181,7 @@
    1.13              groups.append(',');
    1.14            }
    1.15          }
    1.16 -        Log.msg("Posting to group " + groups.toString(), true);
    1.17 +        Log.get().info("Posting to group " + groups.toString());
    1.18  
    1.19          article.setGroup(groups.toString());
    1.20          //article.removeHeader(Headers.REPLY_TO);
    1.21 @@ -190,14 +190,15 @@
    1.22          // Write article to database
    1.23          if(updateReq)
    1.24          {
    1.25 -          Log.msg("Updating " + article.getMessageID() + " with additional groups", true);
    1.26 +          Log.get().info("Updating " + article.getMessageID()
    1.27 +            + " with additional groups");
    1.28            StorageManager.current().delete(article.getMessageID());
    1.29            StorageManager.current().addArticle(article);
    1.30          }
    1.31          else
    1.32          {
    1.33 -          Log.msg("Gatewaying " + article.getMessageID() + " to "
    1.34 -            + article.getHeader(Headers.NEWSGROUPS)[0], true);
    1.35 +          Log.get().info("Gatewaying " + article.getMessageID() + " to "
    1.36 +            + article.getHeader(Headers.NEWSGROUPS)[0]);
    1.37            StorageManager.current().addArticle(article);
    1.38            Stats.getInstance().mailGatewayed(
    1.39              article.getHeader(Headers.NEWSGROUPS)[0]);
    1.40 @@ -213,7 +214,7 @@
    1.41            buf.append(toa.toString());
    1.42          }
    1.43          buf.append(" " + article.getHeader(Headers.LIST_POST)[0]);
    1.44 -        Log.msg("No group for" + buf.toString(), false);
    1.45 +        Log.get().warning("No group for" + buf.toString());
    1.46        }
    1.47        return posted;
    1.48      }
    1.49 @@ -237,7 +238,7 @@
    1.50  
    1.51      if(rcptAddresses == null || rcptAddresses.size() == 0)
    1.52      {
    1.53 -      Log.msg("No ML-address for " + group + " found.", false);
    1.54 +      Log.get().warning("No ML-address for " + group + " found.");
    1.55        return;
    1.56      }
    1.57  
    1.58 @@ -271,8 +272,8 @@
    1.59        smtpTransport.close();
    1.60  
    1.61        Stats.getInstance().mailGatewayed(group);
    1.62 -      Log.msg("MLGateway: Mail " + article.getHeader("Subject")[0]
    1.63 -        + " was delivered to " + rcptAddress + ".", true);
    1.64 +      Log.get().info("MLGateway: Mail " + article.getHeader("Subject")[0]
    1.65 +        + " was delivered to " + rcptAddress + ".");
    1.66      }
    1.67    }
    1.68