You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by ch...@apache.org on 2001/09/25 18:27:07 UTC

cvs commit: jakarta-james/src/java/org/apache/james/imapserver JamesHost.java

charlesb    01/09/25 09:27:07

  Modified:    src/java/org/apache/james James.java
               src/java/org/apache/james/imapserver JamesHost.java
  Log:
  Need loggers!
  
  Revision  Changes    Path
  1.11      +7 -4      jakarta-james/src/java/org/apache/james/James.java
  
  Index: James.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/James.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- James.java	2001/09/25 12:27:43	1.10
  +++ James.java	2001/09/25 16:27:07	1.11
  @@ -53,8 +53,8 @@
    * @author Serge
    * @author <a href="mailto:charles@benett1.demon.co.uk">Charles Benett</a>
    *
  - * This is $Revision: 1.10 $
  - * Committed on $Date: 2001/09/25 12:27:43 $ by: $Author: charlesb $
  + * This is $Revision: 1.11 $
  + * Committed on $Date: 2001/09/25 16:27:07 $ by: $Author: charlesb $
    */
   public class James
       extends AbstractLoggable
  @@ -139,6 +139,7 @@
           } catch  (UnknownHostException ue) {
               hostName = "localhost";
           }
  +        context.put("HostName", hostName);
           getLogger().info("Local host is: " + hostName);
   
           // Get the domains and hosts served by this instance
  @@ -216,8 +217,8 @@
   
               try {
                   // We will need to use a no-args constructor for flexibility
  -                //imapSystem = new Class.forName(imapSystemClass).newInstance();
  -                imapSystem = new SimpleSystem();
  +                imapSystem = (IMAPSystem) Class.forName(imapSystemClass).newInstance();
  +                //imapSystem = new SimpleSystem();
                   imapSystem.configure(conf.getChild("imapHost"));
                   imapSystem.contextualize(context);
                   imapSystem.compose(compMgr);
  @@ -226,8 +227,10 @@
                   }
                   compMgr.put( IMAPSystem.ROLE, (Component)imapSystem);
                   getLogger().info("Using SimpleSystem.");
  +
                   imapHost = (Host) Class.forName(imapHostClass).newInstance();
                   //imapHost = new JamesHost();
  +                setupLogger(imapHost, "IMAPhost");
                   imapHost.configure(conf.getChild("imapHost"));
                   imapHost.contextualize(context);
                   imapHost.compose(compMgr);
  
  
  
  1.3       +3 -1      jakarta-james/src/java/org/apache/james/imapserver/JamesHost.java
  
  Index: JamesHost.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/imapserver/JamesHost.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JamesHost.java	2001/06/06 13:18:05	1.2
  +++ JamesHost.java	2001/09/25 16:27:07	1.3
  @@ -947,10 +947,12 @@
           ACLMailbox userRootFolder = new FileMailbox();
           ACLMailbox userInbox = new FileMailbox();
           try{
  +            setupLogger(userRootFolder);
               userRootFolder.configure(conf);
               userRootFolder.contextualize(context);
               userRootFolder.compose(compMgr);
               userRootFolder.prepareMailbox(user, userRootAbsName, user);
  +            setupLogger(userInbox);
               userInbox.configure(conf);
               userInbox.contextualize(context);
               userInbox.compose(compMgr);
  @@ -960,7 +962,7 @@
               userInbox.initialize();
               userInbox.setRights(user, MailServer.MDA, "lrswi");
           } catch (Exception e) {
  -            getLogger().error("Exception creating new account: " + e);
  +            getLogger().error("Exception creating new account ", e);
               return false;
           }
           userInboxRecord.initialize();
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org