cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: xml-cocoon2/src/org/apache/cocoon/sitemap Manager.java
Date Thu, 12 Jul 2001 12:28:22 GMT
dims        01/07/12 05:28:22

  Modified:    src/org/apache/cocoon Constants.java
               src/org/apache/cocoon/servlet CocoonServlet.java
               src/org/apache/cocoon/sitemap Manager.java
  Log:
  Print full path of the log file in the Sitemap Handler not found message.
  
  Revision  Changes    Path
  1.9       +2 -1      xml-cocoon2/src/org/apache/cocoon/Constants.java
  
  Index: Constants.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/Constants.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Constants.java	2001/07/11 09:49:57	1.8
  +++ Constants.java	2001/07/12 12:28:06	1.9
  @@ -10,7 +10,7 @@
   
   /**
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  - * @version CVS $Revision: 1.8 $ $Date: 2001/07/11 09:49:57 $
  + * @version CVS $Revision: 1.9 $ $Date: 2001/07/12 12:28:06 $
    */
   
   public interface Constants {
  @@ -70,6 +70,7 @@
       String CONTEXT_CLASSPATH       = "classpath";
       String CONTEXT_CONFIG_URL      = "config-url";
       String CONTEXT_LOG_DIR         = "log-directory";
  +    String CONTEXT_LOG_FILE        = "log-file";
   
       boolean DESCRIPTOR_RELOADABLE_DEFAULT = true;
   
  
  
  
  1.16      +4 -1      xml-cocoon2/src/org/apache/cocoon/servlet/CocoonServlet.java
  
  Index: CocoonServlet.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/servlet/CocoonServlet.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- CocoonServlet.java	2001/06/12 03:40:51	1.15
  +++ CocoonServlet.java	2001/07/12 12:28:14	1.16
  @@ -58,7 +58,7 @@
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
    * @author <a href="mailto:nicolaken@supereva.it">Nicola Ken Barozzi</a> Aisa
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
  - * @version CVS $Revision: 1.15 $ $Date: 2001/06/12 03:40:51 $
  + * @version CVS $Revision: 1.16 $ $Date: 2001/07/12 12:28:14 $
    */
   
   public class CocoonServlet extends HttpServlet {
  @@ -312,6 +312,9 @@
               if (logName == null) {
                   logName = "cocoon.log";
               }
  +	
  +	        this.appContext.put(Constants.CONTEXT_LOG_FILE, logName);
  +
               final String path = logDir + logName;
               final AvalonFormatter formatter = new AvalonFormatter();
               formatter.setFormat( "%7.7{priority} %5.5{time}   [%8.8{category}] " +
  
  
  
  1.7       +9 -2      xml-cocoon2/src/org/apache/cocoon/sitemap/Manager.java
  
  Index: Manager.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/sitemap/Manager.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Manager.java	2001/07/06 13:59:36	1.6
  +++ Manager.java	2001/07/12 12:28:19	1.7
  @@ -8,6 +8,7 @@
   
   package org.apache.cocoon.sitemap;
   
  +import java.io.File;
   import java.util.HashMap;
   import java.util.Iterator;
   import org.apache.avalon.framework.component.Component;
  @@ -33,7 +34,7 @@
    * checking regeneration of the sub <code>Sitemap</code>
    *
    * @author <a href="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a>
  - * @version CVS $Revision: 1.6 $ $Date: 2001/07/06 13:59:36 $
  + * @version CVS $Revision: 1.7 $ $Date: 2001/07/12 12:28:19 $
    */
   public class Manager extends AbstractLoggable implements Component, Configurable, Composable,
Contextualizable, ThreadSafe {
       private Context context;
  @@ -49,6 +50,9 @@
   
       /** The sitemap role manager */
       private RoleManager sitemapRoles;
  +    
  +    /** The log file path */
  +    private String logFilePath;
   
       /**
        * Set the role manager
  @@ -69,6 +73,9 @@
        */
       public void contextualize(Context context) throws ContextException {
           this.context = context;
  +        String logDir = (String) context.get(org.apache.cocoon.Constants.CONTEXT_LOG_DIR);
  +        String logFile = (String) context.get(org.apache.cocoon.Constants.CONTEXT_LOG_FILE);
  +        logFilePath = logDir + logFile;
       }
   
       /** get a component manager
  @@ -175,7 +182,7 @@
               environment.changeContext(uri_prefix, source);
               if (!sitemapHandler.available()) {
                   throw new ProcessingException("The sitemap handler's sitemap is not available.
" +
  -                    "Please check cocoon.log for the exact error.",
  +                    "Please check "+ logFilePath +" for the exact error.",
                       sitemapHandler.getException());
               }
       }
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message