mirror of https://github.com/apache/openjpa.git
OPENJPA-158 -- reduced log level to TRACE for a variety of enhancement and metadata related messages
git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@512107 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2a95f80f44
commit
7db81e3d6c
|
@ -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);
|
||||
|
|
|
@ -2822,7 +2822,7 @@ public class PCEnhancer {
|
|||
}
|
||||
|
||||
// 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 @@ public class PCEnhancer {
|
|||
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 @@ 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();
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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())
|
||||
|
|
Loading…
Reference in New Issue