Checked in the patch. Thanks Martin :)

Added another patch by myself at the same position that enables setting of a logger configured on top level in the slide tag in Domain.xml. It was not set before as an initial logger had already been set to org.apache.slide.util.logger.SimpleLogger in selfInit. Fixed this by uncoditionally setting the logger.

Oliver

Martin Holz wrote:

Hello,

during domain initialization Slide tries
to log errors concerning the initialization
of the log system :-). This results in a
NPE hidding the real problem. Attached patch cures this. Not sure,
if slide should always write to stderr
or only, if the logger is null.


Martin



------------------------------------------------------------------------

Index: Domain.java
===================================================================
RCS file: /home/cvspublic/jakarta-slide/src/share/org/apache/slide/common/Domain.java,v
retrieving revision 1.40
diff -u -r1.40 Domain.java
--- Domain.java 29 Aug 2003 12:02:06 -0000      1.40
+++ Domain.java 17 Nov 2003 11:15:00 -0000
@@ -439,7 +439,12 @@
                 logger.setLoggerLevel(loggerLevel);
                 parameters.put( "logger-level", ""+loggerLevel );
             } catch (Exception e) {
-                error(e);
+                if (logger == null) {
+                   System.err.println("Slide domain: initialization of logger 
failed.");
+                   e.printStackTrace();
+               } else {
+                   error(e);
+               }
                 throw new DomainInitializationFailedError
                     ("Logger Problem: " + e.toString());
             }



------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to