openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p..@apache.org
Subject svn commit: r512107 - in /incubator/openjpa/trunk: openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/ openjpa-kernel/src/main/java/org/apache/openjpa/enhance/ openjpa-kernel/src/main/java/org/apache/openjpa/meta/ openjpa-lib/src/main/java/org/a...
Date Tue, 27 Feb 2007 01:59:43 GMT
Author: pcl
Date: Mon Feb 26 17:59:42 2007
New Revision: 512107

URL: http://svn.apache.org/viewvc?view=rev&rev=512107
Log:
OPENJPA-158 -- reduced log level to TRACE for a variety of enhancement and metadata related
messages

Modified:
    incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaGenerator.java
    incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java
    incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/AbstractCFMetaDataFactory.java
    incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/XMLMetaDataParser.java
    incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/AnnotationPersistenceMappingParser.java
    incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XMLPersistenceMappingParser.java
    incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java
    incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java

Modified: incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaGenerator.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaGenerator.java?view=diff&rev=512107&r1=512106&r2=512107
==============================================================================
--- incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaGenerator.java
(original)
+++ incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaGenerator.java
Mon Feb 26 17:59:42 2007
@@ -450,8 +450,8 @@
         throws SQLException {
         fireGenerationEvent(_loc.get("generating-columns", schemaName,
             tableName));
-        if (_log.isInfoEnabled())
-            _log.info(_loc.get("gen-tables", schemaName, tableName));
+        if (_log.isTraceEnabled())
+            _log.trace(_loc.get("gen-tables", schemaName, tableName));
 
         Column[] cols = _dict.getColumns(meta, conn.getCatalog(), schemaName,
             tableName, null, conn);
@@ -813,8 +813,8 @@
         Connection conn, DatabaseMetaData meta)
         throws SQLException {
         fireGenerationEvent(_loc.get("generating-sequences", schemaName));
-        if (_log.isInfoEnabled())
-            _log.info(_loc.get("gen-seqs", schemaName, sequenceName));
+        if (_log.isTraceEnabled())
+            _log.trace(_loc.get("gen-seqs", schemaName, sequenceName));
 
         Sequence[] seqs = _dict.getSequences(meta, conn.getCatalog(),
             schemaName, sequenceName, conn);

Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java?view=diff&rev=512107&r1=512106&r2=512107
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java
(original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java
Mon Feb 26 17:59:42 2007
@@ -2822,7 +2822,7 @@
         }
 
         // if (inst.pcStateManager == null) return inst.<field>;
-        Instruction ins = loadManagedInstance(code, true);
+        loadManagedInstance(code, true);
         code.getfield().setField(SM, SMTYPE);
         JumpInstruction ifins = code.ifnonnull();
         loadManagedInstance(code, true);
@@ -2868,7 +2868,7 @@
         int firstParamOffset = getAccessorParameterOffset();
 
         // if (inst.pcStateManager == null) inst.<field> = value;
-        Instruction ins = loadManagedInstance(code, true);
+        loadManagedInstance(code, true);
         code.getfield().setField(SM, SMTYPE);
         JumpInstruction ifins = code.ifnonnull();
         loadManagedInstance(code, true);
@@ -3594,7 +3594,8 @@
         Class cls;
         for (Iterator itr = classes.iterator(); itr.hasNext();) {
             cls = (Class) itr.next();
-            log.info(_loc.get("enhance-running", cls));
+            if (log.isTraceEnabled())
+                log.trace(_loc.get("enhance-running", cls));
 
             bc = project.loadClass(cls);
             enhancer = new PCEnhancer(conf, bc, repos);
@@ -3603,12 +3604,15 @@
             enhancer.setDirectory(flags.directory);
             enhancer.setAddDefaultConstructor(flags.addDefaultConstructor);
             status = enhancer.run();
-            if (status == ENHANCE_NONE)
-                log.info(_loc.get("enhance-norun"));
-            else if (status == ENHANCE_INTERFACE)
-                log.info(_loc.get("enhance-interface"));
-            else if (status == ENHANCE_AWARE) {
-                log.info(_loc.get("enhance-aware"));
+            if (status == ENHANCE_NONE) {
+                if (log.isTraceEnabled())
+                    log.trace(_loc.get("enhance-norun"));
+            } else if (status == ENHANCE_INTERFACE) {
+                if (log.isTraceEnabled())
+                    log.trace(_loc.get("enhance-interface"));
+            } else if (status == ENHANCE_AWARE) {
+                if (log.isTraceEnabled())
+                    log.trace(_loc.get("enhance-aware"));
                 enhancer.record();
             } else
                 enhancer.record();

Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/AbstractCFMetaDataFactory.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/AbstractCFMetaDataFactory.java?view=diff&rev=512107&r1=512106&r2=512107
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/AbstractCFMetaDataFactory.java
(original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/AbstractCFMetaDataFactory.java
Mon Feb 26 17:59:42 2007
@@ -582,8 +582,8 @@
             else // we don't cache a full dev cp scan
                 _typeNames = names;
 
-            if (log.isInfoEnabled())
-                log.info(_loc.get("found-pcs", String.valueOf(names.size()),
+            if (log.isTraceEnabled())
+                log.trace(_loc.get("found-pcs", String.valueOf(names.size()),
                     String.valueOf(System.currentTimeMillis() - start)));
             return (names.isEmpty()) ? null : names;
         } catch (IOException ioe) {

Modified: incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/XMLMetaDataParser.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/XMLMetaDataParser.java?view=diff&rev=512107&r1=512106&r2=512107
==============================================================================
--- incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/XMLMetaDataParser.java
(original)
+++ incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/XMLMetaDataParser.java
Mon Feb 26 17:59:42 2007
@@ -326,15 +326,15 @@
      */
     protected void parseNewResource(Reader xml, String sourceName)
         throws IOException {
-        if (_log != null && _log.isInfoEnabled())
-            _log.info(_loc.get("start-parse", sourceName));
+        if (_log != null && _log.isTraceEnabled())
+            _log.trace(_loc.get("start-parse", sourceName));
 
         // even if we want to validate, specify that it won't happen
         // if we have neither a DocType not a Schema
         Object schemaSource = getSchemaSource();
         if (schemaSource != null && _schemaBug) {
-            if (_log != null && _log.isInfoEnabled())
-                _log.info(_loc.get("parser-schema-bug"));
+            if (_log != null && _log.isTraceEnabled())
+                _log.trace(_loc.get("parser-schema-bug"));
             schemaSource = null;
         }
         boolean validating = _validating && (getDocType() != null 

Modified: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/AnnotationPersistenceMappingParser.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/AnnotationPersistenceMappingParser.java?view=diff&rev=512107&r1=512106&r2=512107
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/AnnotationPersistenceMappingParser.java
(original)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/AnnotationPersistenceMappingParser.java
Mon Feb 26 17:59:42 2007
@@ -197,8 +197,8 @@
             throw new MetaDataException(_loc.get("no-gen-name", el));
 
         Log log = getLog();
-        if (log.isInfoEnabled())
-            log.info(_loc.get("parse-gen", name));
+        if (log.isTraceEnabled())
+            log.trace(_loc.get("parse-gen", name));
 
         SequenceMapping meta = (SequenceMapping) getRepository().
             getCachedSequenceMetaData(name);
@@ -481,8 +481,8 @@
         MappingRepository repos = (MappingRepository) getRepository();
         Log log = getLog();
         for (SqlResultSetMapping anno : annos) {
-            if (log.isInfoEnabled())
-                log.info(_loc.get("parse-sqlrsmapping", anno.name()));
+            if (log.isTraceEnabled())
+                log.trace(_loc.get("parse-sqlrsmapping", anno.name()));
 
             QueryResultMapping result = repos.getCachedQueryResultMapping
                 (null, anno.name());

Modified: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XMLPersistenceMappingParser.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XMLPersistenceMappingParser.java?view=diff&rev=512107&r1=512106&r2=512107
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XMLPersistenceMappingParser.java
(original)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XMLPersistenceMappingParser.java
Mon Feb 26 17:59:42 2007
@@ -370,8 +370,8 @@
     private boolean startTableGenerator(Attributes attrs) {
         String name = attrs.getValue("name");
         Log log = getLog();
-        if (log.isInfoEnabled())
-            log.info(_loc.get("parse-gen", name));
+        if (log.isTraceEnabled())
+            log.trace(_loc.get("parse-gen", name));
         if (getRepository().getCachedSequenceMetaData(name) != null
             && log.isWarnEnabled())
             log.warn(_loc.get("override-gen", name));
@@ -781,8 +781,8 @@
     private boolean startSQLResultSetMapping(Attributes attrs) {
         String name = attrs.getValue("name");
         Log log = getLog();
-        if (log.isInfoEnabled())
-            log.info(_loc.get("parse-sqlrsmapping", name));
+        if (log.isTraceEnabled())
+            log.trace(_loc.get("parse-sqlrsmapping", name));
 
         MappingRepository repos = (MappingRepository) getRepository();
         QueryResultMapping result = repos.getCachedQueryResultMapping

Modified: incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java?view=diff&rev=512107&r1=512106&r2=512107
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java
(original)
+++ incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java
Mon Feb 26 17:59:42 2007
@@ -335,8 +335,8 @@
      * Parse persistence metadata for the given class.
      */
     public void parse(Class cls) {
-        if (_log.isInfoEnabled())
-            _log.info(_loc.get("parse-class", cls.getName()));
+        if (_log.isTraceEnabled())
+            _log.trace(_loc.get("parse-class", cls.getName()));
 
         _cls = cls;
         try {
@@ -369,8 +369,8 @@
             return;
 
         int pkgMode = getSourceMode(pkg);
-        if (pkgMode == 0 && _log.isInfoEnabled())
-            _log.info(_loc.get("parse-package", _cls.getName()));
+        if (pkgMode == 0 && _log.isTraceEnabled())
+            _log.trace(_loc.get("parse-package", _cls.getName()));
         if ((pkgMode & _mode) == _mode) // already visited
             return;
 
@@ -1440,8 +1440,8 @@
         if (StringUtils.isEmpty(name))
             throw new MetaDataException(_loc.get("no-seq-name", el));
 
-        if (_log.isInfoEnabled())
-            _log.info(_loc.get("parse-sequence", name));
+        if (_log.isTraceEnabled())
+            _log.trace(_loc.get("parse-sequence", name));
 
         SequenceMetaData meta = getRepository().getCachedSequenceMetaData
             (name);
@@ -1495,8 +1495,8 @@
                 throw new MetaDataException(_loc.get("no-query-string",
                     query.name(), el));
 
-            if (_log.isInfoEnabled())
-                _log.info(_loc.get("parse-query", query.name()));
+            if (_log.isTraceEnabled())
+                _log.trace(_loc.get("parse-query", query.name()));
 
             meta = getRepository().getCachedQueryMetaData(null, query.name());
             if (meta != null) {
@@ -1536,8 +1536,8 @@
                 throw new MetaDataException(_loc.get("no-native-query-string",
                     query.name(), el));
 
-            if (_log.isInfoEnabled())
-                _log.info(_loc.get("parse-native-query", query.name()));
+            if (_log.isTraceEnabled())
+                _log.trace(_loc.get("parse-native-query", query.name()));
 
             meta = getRepository().getCachedQueryMetaData(null, query.name());
             if (meta != null) {

Modified: incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java?view=diff&rev=512107&r1=512106&r2=512107
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java
(original)
+++ incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java
Mon Feb 26 17:59:42 2007
@@ -727,8 +727,8 @@
         }
 
         Log log = getLog();
-        if (log.isInfoEnabled())
-            log.info(_loc.get("parse-class", _cls.getName()));
+        if (log.isTraceEnabled())
+            log.trace(_loc.get("parse-class", _cls.getName()));
 
         MetaDataRepository repos = getRepository();
         ClassMetaData meta = repos.getCachedMetaData(_cls);
@@ -853,8 +853,8 @@
 
         String name = attrs.getValue("name");
         Log log = getLog();
-        if (log.isInfoEnabled())
-            log.info(_loc.get("parse-sequence", name));
+        if (log.isTraceEnabled())
+            log.trace(_loc.get("parse-sequence", name));
 
         SequenceMetaData meta = getRepository().getCachedSequenceMetaData(name);
         if (meta != null && log.isWarnEnabled())
@@ -1373,8 +1373,8 @@
 
         String name = attrs.getValue("name");
         Log log = getLog();
-        if (log.isInfoEnabled())
-            log.info(_loc.get("parse-query", name));
+        if (log.isTraceEnabled())
+            log.trace(_loc.get("parse-query", name));
 
         QueryMetaData meta = getRepository().getCachedQueryMetaData(null, name);
         if (meta != null && log.isWarnEnabled())
@@ -1439,8 +1439,8 @@
 
         String name = attrs.getValue("name");
         Log log = getLog();
-        if (log.isInfoEnabled())
-            log.info(_loc.get("parse-native-query", name));
+        if (log.isTraceEnabled())
+            log.trace(_loc.get("parse-native-query", name));
 
         QueryMetaData meta = getRepository().getCachedQueryMetaData(null, name);
         if (meta != null && log.isWarnEnabled())



Mime
View raw message