diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaGenerator.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaGenerator.java index 45731e335..b471f4eab 100644 --- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaGenerator.java +++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaGenerator.java @@ -450,8 +450,8 @@ public class SchemaGenerator { 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 @@ public class SchemaGenerator { 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); diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java b/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java index babbd9882..a6222112b 100644 --- a/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java +++ b/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java @@ -2822,7 +2822,7 @@ public class PCEnhancer { } // if (inst.pcStateManager == null) return inst.; - Instruction ins = loadManagedInstance(code, true); + loadManagedInstance(code, true); code.getfield().setField(SM, SMTYPE); JumpInstruction ifins = code.ifnonnull(); loadManagedInstance(code, true); @@ -2868,7 +2868,7 @@ public class PCEnhancer { int firstParamOffset = getAccessorParameterOffset(); // if (inst.pcStateManager == null) inst. = 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 @@ public class PCEnhancer { 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 @@ public class PCEnhancer { 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(); diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/meta/AbstractCFMetaDataFactory.java b/openjpa-kernel/src/main/java/org/apache/openjpa/meta/AbstractCFMetaDataFactory.java index 1a2dc9b18..ee5c11e2e 100644 --- a/openjpa-kernel/src/main/java/org/apache/openjpa/meta/AbstractCFMetaDataFactory.java +++ b/openjpa-kernel/src/main/java/org/apache/openjpa/meta/AbstractCFMetaDataFactory.java @@ -582,8 +582,8 @@ public abstract class AbstractCFMetaDataFactory 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) { diff --git a/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/XMLMetaDataParser.java b/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/XMLMetaDataParser.java index 05bf6bcf4..6a25d0106 100644 --- a/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/XMLMetaDataParser.java +++ b/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/XMLMetaDataParser.java @@ -326,15 +326,15 @@ public abstract class XMLMetaDataParser extends DefaultHandler */ 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 diff --git a/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/AnnotationPersistenceMappingParser.java b/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/AnnotationPersistenceMappingParser.java index 8669621c6..1627a628b 100644 --- a/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/AnnotationPersistenceMappingParser.java +++ b/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/AnnotationPersistenceMappingParser.java @@ -197,8 +197,8 @@ public class AnnotationPersistenceMappingParser 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 @@ public class AnnotationPersistenceMappingParser 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()); diff --git a/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XMLPersistenceMappingParser.java b/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XMLPersistenceMappingParser.java index 3fb45a90c..1e7c28a67 100644 --- a/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XMLPersistenceMappingParser.java +++ b/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XMLPersistenceMappingParser.java @@ -370,8 +370,8 @@ public class XMLPersistenceMappingParser 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 @@ public class XMLPersistenceMappingParser 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 diff --git a/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java b/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java index cc5a93a9e..67b832dfa 100644 --- a/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java +++ b/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java @@ -335,8 +335,8 @@ public class AnnotationPersistenceMetaDataParser * 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 @@ public class AnnotationPersistenceMetaDataParser 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 @@ public class AnnotationPersistenceMetaDataParser 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 @@ public class AnnotationPersistenceMetaDataParser 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 @@ public class AnnotationPersistenceMetaDataParser 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) { diff --git a/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java b/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java index 27b141499..7a6d1688f 100644 --- a/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java +++ b/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java @@ -727,8 +727,8 @@ public class XMLPersistenceMetaDataParser } 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 @@ public class XMLPersistenceMetaDataParser 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 @@ public class XMLPersistenceMetaDataParser 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 @@ public class XMLPersistenceMetaDataParser 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())