You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by st...@locus.apache.org on 2000/04/08 02:46:27 UTC
cvs commit: xml-cocoon/src/org/apache/cocoon Engine.java
stefano 00/04/07 17:46:27
Modified: src/org/apache/cocoon Engine.java
Log:
fixed NPE when calling from the command line
Revision Changes Path
1.21 +7 -3 xml-cocoon/src/org/apache/cocoon/Engine.java
Index: Engine.java
===================================================================
RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/Engine.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- Engine.java 2000/03/17 16:46:59 1.20
+++ Engine.java 2000/04/08 00:46:26 1.21
@@ -1,4 +1,4 @@
-/*-- $Id: Engine.java,v 1.20 2000/03/17 16:46:59 stefano Exp $ --
+/*-- $Id: Engine.java,v 1.21 2000/04/08 00:46:26 stefano Exp $ --
============================================================================
The Apache Software License, Version 1.1
@@ -73,7 +73,7 @@
* This class implements the engine that does all the document processing.
*
* @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
- * @version $Revision: 1.20 $ $Date: 2000/03/17 16:46:59 $
+ * @version $Revision: 1.21 $ $Date: 2000/04/08 00:46:26 $
*/
public class Engine implements Defaults {
@@ -114,7 +114,11 @@
this.configurations = configurations;
// stores the engine context
- if ((context != null) && (context instanceof ServletContext)) {
+ if (context == null) {
+ // use the STDIO logger if no context is available
+ logger = new StdioLogger((String) configurations.get(LOG_LEVEL));
+ manager.setRole("logger", logger);
+ } else if (context instanceof ServletContext) {
this.servletContext = (ServletContext) context;
// register the context