dims        01/06/22 11:19:25

  Modified:    src/org/apache/cocoon Tag: cocoon_20_branch Cocoon.java
  Log:
  Dump System Properties into the log file. Makes it easier to diagnose
  problems when we get the full cocoon.log file from someone.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.9.2.6   +20 -1     xml-cocoon2/src/org/apache/cocoon/Cocoon.java
  
  Index: Cocoon.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/Cocoon.java,v
  retrieving revision 1.9.2.5
  retrieving revision 1.9.2.6
  diff -u -r1.9.2.5 -r1.9.2.6
  --- Cocoon.java       2001/06/08 20:21:23     1.9.2.5
  +++ Cocoon.java       2001/06/22 18:19:25     1.9.2.6
  @@ -55,7 +55,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Pierpaolo Fumagalli</a> (Apache 
Software Foundation, Exoffice Technologies)
    * @author <a href="mailto:[EMAIL PROTECTED]";>Stefano Mazzocchi</a>
  - * @version CVS $Revision: 1.9.2.5 $ $Date: 2001/06/08 20:21:23 $
  + * @version CVS $Revision: 1.9.2.6 $ $Date: 2001/06/22 18:19:25 $
    */
   public class Cocoon extends AbstractLoggable implements ThreadSafe, Component, 
Initializable, Disposable, Modifiable, Processor, Contextualizable {
       /** The application context */
  @@ -117,6 +117,10 @@
           this.componentManager.contextualize(this.context);
   
           getLogger().debug("New Cocoon object.");
  +
  +        // Log the System Properties.
  +        dumpSystemProperties();
  +
           // Setup the default parser, for parsing configuration.
           // If one need to use a different parser, set the given system property
           String parser = System.getProperty(Constants.PARSER_PROPERTY, 
Constants.DEFAULT_PARSER);
  @@ -172,6 +176,21 @@
           getLogger().debug("Sitemap location = " + this.sitemapFileName);
           getLogger().debug("Checking sitemap reload = " + this.checkSitemapReload);
           getLogger().debug("Reloading sitemap asynchron = " + 
this.reloadSitemapAsynchron);
  +    }
  +
  +    /** Dump System Properties */
  +    private void dumpSystemProperties() {
  +      try {
  +         Enumeration e = System.getProperties().propertyNames();
  +         getLogger().debug("===== System Properties Start =====");
  +         for (;e.hasMoreElements();) {
  +            String key = (String) e.nextElement();
  +            getLogger().debug(key + "=" + System.getProperty(key));
  +         }
  +         getLogger().debug("===== System Properties End =====");
  +       } catch ( SecurityException se ) { 
  +         // Ignore Exceptions.
  +       }
       }
   
       /** Configure this <code>Cocoon</code> instance. */
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to