cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sylv...@apache.org
Subject cvs commit: xml-cocoon2/src/java/org/apache/cocoon/servlet CocoonServlet.java
Date Mon, 11 Mar 2002 14:27:36 GMT
sylvain     02/03/11 06:27:36

  Modified:    src/java/org/apache/cocoon/servlet CocoonServlet.java
  Log:
  Add "/WEB-INF/logkit.xconf" as default value for "logkit-config" servlet parameter
  
  Revision  Changes    Path
  1.16      +9 -7      xml-cocoon2/src/java/org/apache/cocoon/servlet/CocoonServlet.java
  
  Index: CocoonServlet.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/servlet/CocoonServlet.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- CocoonServlet.java	2 Mar 2002 03:55:17 -0000	1.15
  +++ CocoonServlet.java	11 Mar 2002 14:27:35 -0000	1.16
  @@ -118,7 +118,7 @@
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
    * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
    * @author <a href="mailto:leo.sutic@inspireinfrastructure.com">Leo Sutic</a>
  - * @version CVS $Id: CocoonServlet.java,v 1.15 2002/03/02 03:55:17 vgritsenko Exp $
  + * @version CVS $Id: CocoonServlet.java,v 1.16 2002/03/11 14:27:35 sylvain Exp $
    */
   public class CocoonServlet extends HttpServlet {
   
  @@ -755,13 +755,15 @@
               this.logKitManager = logKitManager;
   
               //Configure the logkit management
  -            final String logkitConfig = getInitParameter("logkit-config");
  -            if (logkitConfig != null) {
  -                final InputStream is = this.servletContext.getResourceAsStream(logkitConfig);
  -                final DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
  -                final Configuration conf = builder.build(is);
  -                logKitManager.configure(conf);
  +            String logkitConfig = getInitParameter("logkit-config");
  +            if (logkitConfig == null) {
  +                logkitConfig = "/WEB-INF/logkit.xconf";
               }
  +
  +            final InputStream is = this.servletContext.getResourceAsStream(logkitConfig);
  +            final DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
  +            final Configuration conf = builder.build(is);
  +            logKitManager.configure(conf);
           } catch (Exception e) {
               Hierarchy.getDefaultHierarchy().log("Could not set up Cocoon Logger, will use
screen instead", e);
           }
  
  
  

----------------------------------------------------------------------
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