[jbosscache-commits] JBoss Cache SVN: r7166 - core/trunk/src/main/java/org/jboss/cache/config/parsing.

jbosscache-commits at lists.jboss.org jbosscache-commits at lists.jboss.org
Wed Nov 19 10:44:21 EST 2008


Author: manik.surtani at jboss.com
Date: 2008-11-19 10:44:21 -0500 (Wed, 19 Nov 2008)
New Revision: 7166

Modified:
   core/trunk/src/main/java/org/jboss/cache/config/parsing/CacheConfigsXmlParser.java
Log:
More helpful log

Modified: core/trunk/src/main/java/org/jboss/cache/config/parsing/CacheConfigsXmlParser.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/config/parsing/CacheConfigsXmlParser.java	2008-11-19 15:27:29 UTC (rev 7165)
+++ core/trunk/src/main/java/org/jboss/cache/config/parsing/CacheConfigsXmlParser.java	2008-11-19 15:44:21 UTC (rev 7166)
@@ -1,24 +1,24 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2000 - 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2000 - 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
 package org.jboss.cache.config.parsing;
 
 import org.apache.commons.logging.Log;
@@ -85,10 +85,10 @@
          throw new ConfigurationException("Unable to find config file " + fileName + " either in classpath or on the filesystem!");
       }
 
-      return parseConfigs(is);
+      return parseConfigs(is, fileName);
    }
 
-   public Map<String, Configuration> parseConfigs(InputStream stream) throws CloneNotSupportedException
+   public Map<String, Configuration> parseConfigs(InputStream stream, String fileName) throws CloneNotSupportedException
    {
       // loop through all elements in XML.
       Element root = getDocumentRoot(stream);
@@ -126,7 +126,10 @@
          }
          else
          {
-            log.debug("Detected legacy configuration file format when parsing configuration file.  Migrating to the new (3.x) file format is recommended.  See FAQs for details.");
+            if (fileName == null)
+               log.debug("Detected legacy configuration file format when parsing configuration XML from input stream ["+stream+"].  Migrating to the new (3.x) file format is recommended.  See FAQs for details.");
+            else
+               log.debug("Detected legacy configuration file format when parsing configuration file ["+fileName+"].  Migrating to the new (3.x) file format is recommended.  See FAQs for details.");
             XmlConfigurationParser2x oldParser = new XmlConfigurationParser2x();
             c = oldParser.parseConfiguration(element);
          }




More information about the jbosscache-commits mailing list