cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r764606 - in /cxf/trunk/rt/databinding/aegis/src: main/java/org/apache/cxf/aegis/type/ main/java/org/apache/cxf/aegis/type/basic/ main/java/org/apache/cxf/aegis/type/encoded/ test/java/org/apache/cxf/aegis/services/base64/
Date Mon, 13 Apr 2009 21:07:57 GMT
Author: dkulp
Date: Mon Apr 13 21:07:57 2009
New Revision: 764606

URL: http://svn.apache.org/viewvc?rev=764606&view=rev
Log:
[CXF-2170] Update all logging to use j.u.l

Modified:
    cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/DefaultTypeMapping.java
    cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/TypeUtil.java
    cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/XMLTypeCreator.java
    cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ArrayType.java
    cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/XMLBeanTypeInfo.java
    cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/encoded/SoapArrayType.java
    cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/base64/BinaryDataService.java

Modified: cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/DefaultTypeMapping.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/DefaultTypeMapping.java?rev=764606&r1=764605&r2=764606&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/DefaultTypeMapping.java
(original)
+++ cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/DefaultTypeMapping.java
Mon Apr 13 21:07:57 2009
@@ -28,6 +28,7 @@
 import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.logging.Logger;
 
 import javax.activation.DataHandler;
 import javax.activation.DataSource;
@@ -37,8 +38,6 @@
 
 import org.w3c.dom.Document;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.cxf.aegis.type.basic.Base64Type;
 import org.apache.cxf.aegis.type.basic.BigDecimalType;
 import org.apache.cxf.aegis.type.basic.BigIntegerType;
@@ -69,6 +68,7 @@
 import org.apache.cxf.aegis.type.xml.XMLStreamReaderType;
 import org.apache.cxf.binding.soap.Soap11;
 import org.apache.cxf.common.classloader.ClassLoaderUtils;
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.SOAPConstants;
 import org.apache.cxf.common.util.XMLSchemaQNames;
 
@@ -77,7 +77,7 @@
  */
 public class DefaultTypeMapping implements TypeMapping {
     public  static final String DEFAULT_MAPPING_URI = "urn:org.apache.cxf.aegis.types";
-    private static final Log LOG = LogFactory.getLog(DefaultTypeMapping.class);
+    private static final Logger LOG = LogUtils.getL7dLogger(DefaultTypeMapping.class);
     private Map<Class, Type> class2Type;
     private Map<QName, Type> xml2Type;
     private Map<Class, QName> class2xml;
@@ -146,7 +146,7 @@
             xml2Type.put(type.getSchemaType(), type);
         }
         if (type.getTypeClass() == null && type.getSchemaType() == null) {
-            LOG.warn("The type " + type.getClass().getName()
+            LOG.warning("The type " + type.getClass().getName()
                      + " supports neither serialization (non-null TypeClass)"
                      + " nor deserialization (non-null SchemaType).");
         }

Modified: cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/TypeUtil.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/TypeUtil.java?rev=764606&r1=764605&r2=764606&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/TypeUtil.java (original)
+++ cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/TypeUtil.java Mon
Apr 13 21:07:57 2009
@@ -18,12 +18,13 @@
  */
 package org.apache.cxf.aegis.type;
 
+import java.util.logging.Logger;
+
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLStreamReader;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.cxf.aegis.AegisContext;
 import org.apache.cxf.aegis.util.NamespaceHelper;
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.SOAPConstants;
 import org.apache.cxf.common.xmlschema.XmlSchemaUtils;
 import org.apache.ws.commons.schema.XmlSchema;
@@ -35,7 +36,7 @@
  * @author <a href="mailto:dan@envoisolutions.com">Dan Diephouse</a>
  */
 public final class TypeUtil {
-    public static final Log LOG = LogFactory.getLog(TypeUtil.class);
+    public static final Logger LOG = LogUtils.getL7dLogger(TypeUtil.class);
 
     private TypeUtil() {
         //utility class
@@ -45,7 +46,7 @@
 
         if (!context.isReadXsiTypes()) {
             if (baseType == null) {
-                LOG.warn("xsi:type reading disabled, and no type available for "  
+                LOG.warning("xsi:type reading disabled, and no type available for "  
                          + xsr.getName());
             }
             return baseType;
@@ -71,18 +72,18 @@
             }
         
             if (baseType != null) {
-                LOG.debug("xsi:type=\"" + overrideName
+                LOG.finest("xsi:type=\"" + overrideName
                          + "\" was specified, but no corresponding Type was registered; defaulting
to "
                          + baseType.getSchemaType());
                 return baseType;
             } else {
-                LOG.warn("xsi:type=\"" + overrideName
+                LOG.warning("xsi:type=\"" + overrideName
                          + "\" was specified, but no corresponding Type was registered; no
default.");
                 return null;
             }
         } else {
             if (baseType == null) {
-                LOG.warn("xsi:type absent, and no type available for "  
+                LOG.warning("xsi:type absent, and no type available for "  
                          + xsr.getName());
             }
             return baseType;
@@ -104,7 +105,7 @@
         }
 
         if (!context.isReadXsiTypes()) {
-            LOG.warn("xsi:type reading disabled, and no type available for "  
+            LOG.warning("xsi:type reading disabled, and no type available for "  
                      + xsr.getName());
             return null;
         }
@@ -125,11 +126,11 @@
                 return type;
             }
                     
-            LOG.warn("xsi:type=\"" + schemaTypeName
+            LOG.warning("xsi:type=\"" + schemaTypeName
                      + "\" was specified, but no corresponding Type was registered; no default.");
             return null;
         }
-        LOG.warn("xsi:type was not specified for top-level element " + xsr.getName());
+        LOG.warning("xsi:type was not specified for top-level element " + xsr.getName());
         return null;
     }
     

Modified: cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/XMLTypeCreator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/XMLTypeCreator.java?rev=764606&r1=764605&r2=764606&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/XMLTypeCreator.java
(original)
+++ cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/XMLTypeCreator.java
Mon Apr 13 21:07:57 2009
@@ -28,6 +28,8 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import javax.xml.XMLConstants;
 import javax.xml.namespace.QName;
@@ -49,13 +51,12 @@
 import org.xml.sax.SAXException;
 import org.xml.sax.SAXParseException;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.cxf.aegis.DatabindingException;
 import org.apache.cxf.aegis.type.basic.BeanType;
 import org.apache.cxf.aegis.type.basic.XMLBeanTypeInfo;
 import org.apache.cxf.aegis.util.NamespaceHelper;
 import org.apache.cxf.common.classloader.ClassLoaderUtils;
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.helpers.DOMUtils;
 import org.apache.cxf.helpers.XPathUtils;
 
@@ -96,7 +97,7 @@
  * specified.
  */
 public class XMLTypeCreator extends AbstractTypeCreator {
-    private static final Log LOG = LogFactory.getLog(XMLTypeCreator.class);
+    private static final Logger LOG = LogUtils.getL7dLogger(XMLTypeCreator.class);
     private static List<Class> stopClasses = new ArrayList<Class>();
     static {
         stopClasses.add(Object.class);
@@ -124,13 +125,13 @@
                 aegisDocumentBuilderFactory.setSchema(aegisSchema);
             } catch (UnsupportedOperationException e) {
                 //Parsers that don't support schema validation
-                LOG.info("Parser doesn't support setSchema.  Not validating.", e);
+                LOG.log(Level.INFO, "Parser doesn't support setSchema.  Not validating.",
e);
             } catch (IOException ie) {
-                LOG.error("Error reading Aegis schema", ie);
+                LOG.log(Level.SEVERE, "Error reading Aegis schema", ie);
             } catch (FactoryConfigurationError e) {
-                LOG.error("Error reading Aegis schema", e);
+                LOG.log(Level.SEVERE, "Error reading Aegis schema", e);
             } catch (SAXException e) {
-                LOG.error("Error reading Aegis schema", e);
+                LOG.log(Level.SEVERE, "Error reading Aegis schema", e);
             }
         }
     }
@@ -142,7 +143,7 @@
         try {
             documentBuilder = aegisDocumentBuilderFactory.newDocumentBuilder();
         } catch (ParserConfigurationException e) {
-            LOG.error("Unable to create a document builder, e");
+            LOG.log(Level.SEVERE, "Unable to create a document builder, e");
             throw new RuntimeException("Unable to create a document builder, e");
         }
         org.w3c.dom.Document doc;
@@ -165,26 +166,26 @@
 
             public void error(SAXParseException exception) throws SAXException {
                 String message = errorMessage(exception);
-                LOG.error(message, exception);
+                LOG.log(Level.SEVERE, message, exception);
                 throwDatabindingException(message);
 
             }
 
             public void fatalError(SAXParseException exception) throws SAXException {
                 String message = errorMessage(exception);
-                LOG.error(message, exception);
+                LOG.log(Level.SEVERE, message, exception);
                 throwDatabindingException(message);
             }
 
             public void warning(SAXParseException exception) throws SAXException {
-                LOG.info(errorMessage(exception), exception);
+                LOG.log(Level.INFO, errorMessage(exception), exception);
             }
         });
 
         try {
             doc = documentBuilder.parse(is);
         } catch (SAXException e) {
-            LOG.error("Error parsing Aegis file.", e); // can't happen due to
+            LOG.log(Level.SEVERE, "Error parsing Aegis file.", e); // can't happen due to
                                                         // above.
             return null;
         }
@@ -202,16 +203,16 @@
         String path = '/' + clazz.getName().replace('.', '/') + ".aegis.xml";
         InputStream is = clazz.getResourceAsStream(path);
         if (is == null) {
-            LOG.debug("Mapping file : " + path + " not found.");
+            LOG.finest("Mapping file : " + path + " not found.");
             return null;
         }
-        LOG.debug("Found mapping file : " + path);
+        LOG.finest("Found mapping file : " + path);
         try {
             doc = readAegisFile(is, path);
             documents.put(clazz.getName(), doc);
             return doc;
         } catch (IOException e) {
-            LOG.error("Error loading file " + path, e);
+            LOG.log(Level.SEVERE, "Error loading file " + path, e);
             return null;
         }
     }

Modified: cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ArrayType.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ArrayType.java?rev=764606&r1=764605&r2=764606&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ArrayType.java
(original)
+++ cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ArrayType.java
Mon Apr 13 21:07:57 2009
@@ -23,17 +23,17 @@
 import java.util.Collection;
 import java.util.HashSet;
 import java.util.Set;
+import java.util.logging.Logger;
 
 import javax.xml.namespace.QName;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.cxf.aegis.Context;
 import org.apache.cxf.aegis.DatabindingException;
 import org.apache.cxf.aegis.type.Type;
 import org.apache.cxf.aegis.type.TypeUtil;
 import org.apache.cxf.aegis.xml.MessageReader;
 import org.apache.cxf.aegis.xml.MessageWriter;
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.xmlschema.XmlSchemaConstants;
 import org.apache.ws.commons.schema.XmlSchema;
 import org.apache.ws.commons.schema.XmlSchemaComplexType;
@@ -46,7 +46,7 @@
  * @author <a href="mailto:dan@envoisolutions.com">Dan Diephouse</a>
  */
 public class ArrayType extends Type {
-    private static final Log LOG = LogFactory.getLog(ArrayType.class);
+    private static final Logger LOG = LogUtils.getL7dLogger(ArrayType.class);
 
     private QName componentName;
     private long minOccurs;
@@ -357,7 +357,7 @@
             // We couldn't find the type the user specified. One is created
             // below instead.
             if (type == null) {
-                LOG.debug("Couldn't find array component type " + componentName + ". Creating
one instead.");
+                LOG.finest("Couldn't find array component type " + componentName + ". Creating
one instead.");
             }
         }
 

Modified: cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/XMLBeanTypeInfo.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/XMLBeanTypeInfo.java?rev=764606&r1=764605&r2=764606&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/XMLBeanTypeInfo.java
(original)
+++ cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/XMLBeanTypeInfo.java
Mon Apr 13 21:07:57 2009
@@ -23,21 +23,21 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.logging.Logger;
 
 import javax.xml.namespace.QName;
 
 import org.w3c.dom.Element;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.cxf.aegis.DatabindingException;
 import org.apache.cxf.aegis.type.Type;
 import org.apache.cxf.aegis.util.NamespaceHelper;
 import org.apache.cxf.common.classloader.ClassLoaderUtils;
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.helpers.DOMUtils;
 
 public class XMLBeanTypeInfo extends BeanTypeInfo {
-    private static final Log LOG = LogFactory.getLog(XMLBeanTypeInfo.class);
+    private static final Logger LOG = LogUtils.getL7dLogger(XMLBeanTypeInfo.class);
     private List mappings;
 
     /**
@@ -73,7 +73,7 @@
                 return;
             }
 
-            LOG.debug("Found mapping for property " + pd.getName());
+            LOG.finest("Found mapping for property " + pd.getName());
 
             style = DOMUtils.getAttributeValueEmptyNull(e, "style");
         }

Modified: cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/encoded/SoapArrayType.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/encoded/SoapArrayType.java?rev=764606&r1=764605&r2=764606&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/encoded/SoapArrayType.java
(original)
+++ cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/encoded/SoapArrayType.java
Mon Apr 13 21:07:57 2009
@@ -25,11 +25,10 @@
 import java.util.List;
 import java.util.Set;
 import java.util.StringTokenizer;
+import java.util.logging.Logger;
 
 import javax.xml.namespace.QName;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.cxf.aegis.Context;
 import org.apache.cxf.aegis.DatabindingException;
 import org.apache.cxf.aegis.type.Type;
@@ -39,13 +38,14 @@
 import org.apache.cxf.aegis.xml.MessageReader;
 import org.apache.cxf.aegis.xml.MessageWriter;
 import org.apache.cxf.binding.soap.Soap11;
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.ws.commons.schema.XmlSchema;
 
 import static org.apache.cxf.aegis.type.encoded.SoapEncodingUtil.readAttributeValue;
 
 public class SoapArrayType extends Type {
-    private static final Log LOG = LogFactory.getLog(SoapArrayType.class);
+    private static final Logger LOG = LogUtils.getL7dLogger(SoapArrayType.class);
     private static final String SOAP_ENCODING_NS_1_1 = Soap11.getInstance().getSoapEncodingStyle();
     private static final QName SOAP_ARRAY_POSITION = new QName(SOAP_ENCODING_NS_1_1, "position");
 
@@ -395,7 +395,7 @@
             // We couldn't find the type the user specified. One is created
             // below instead.
             if (type == null) {
-                LOG.debug("Couldn't find array component type " + componentName + ". Creating
one instead.");
+                LOG.finest("Couldn't find array component type " + componentName + ". Creating
one instead.");
             }
         }
 

Modified: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/base64/BinaryDataService.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/base64/BinaryDataService.java?rev=764606&r1=764605&r2=764606&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/base64/BinaryDataService.java
(original)
+++ cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/base64/BinaryDataService.java
Mon Apr 13 21:07:57 2009
@@ -20,20 +20,13 @@
 
 import java.util.zip.CRC32;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 
 public class BinaryDataService {
-    private final Log log = LogFactory.getLog(getClass());
 
     public String verifyDataIntegrity(byte[] data, int length, long crc32) {
-        log.debug("verifyDataIntegrity([" + data.length + " bytes of data], " + length +
", " + crc32
-                  + ") called.");
 
-        String status = getStatusForData(data, length, crc32);
+        return getStatusForData(data, length, crc32);
 
-        log.debug("verifyDataIntegrity status: " + status);
-        return status;
     }
 
     /**



Mime
View raw message