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 {
|
throws SQLException {
|
||||||
fireGenerationEvent(_loc.get("generating-columns", schemaName,
|
fireGenerationEvent(_loc.get("generating-columns", schemaName,
|
||||||
tableName));
|
tableName));
|
||||||
if (_log.isInfoEnabled())
|
if (_log.isTraceEnabled())
|
||||||
_log.info(_loc.get("gen-tables", schemaName, tableName));
|
_log.trace(_loc.get("gen-tables", schemaName, tableName));
|
||||||
|
|
||||||
Column[] cols = _dict.getColumns(meta, conn.getCatalog(), schemaName,
|
Column[] cols = _dict.getColumns(meta, conn.getCatalog(), schemaName,
|
||||||
tableName, null, conn);
|
tableName, null, conn);
|
||||||
|
@ -813,8 +813,8 @@ public class SchemaGenerator {
|
||||||
Connection conn, DatabaseMetaData meta)
|
Connection conn, DatabaseMetaData meta)
|
||||||
throws SQLException {
|
throws SQLException {
|
||||||
fireGenerationEvent(_loc.get("generating-sequences", schemaName));
|
fireGenerationEvent(_loc.get("generating-sequences", schemaName));
|
||||||
if (_log.isInfoEnabled())
|
if (_log.isTraceEnabled())
|
||||||
_log.info(_loc.get("gen-seqs", schemaName, sequenceName));
|
_log.trace(_loc.get("gen-seqs", schemaName, sequenceName));
|
||||||
|
|
||||||
Sequence[] seqs = _dict.getSequences(meta, conn.getCatalog(),
|
Sequence[] seqs = _dict.getSequences(meta, conn.getCatalog(),
|
||||||
schemaName, sequenceName, conn);
|
schemaName, sequenceName, conn);
|
||||||
|
|
|
@ -2822,7 +2822,7 @@ public class PCEnhancer {
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (inst.pcStateManager == null) return inst.<field>;
|
// if (inst.pcStateManager == null) return inst.<field>;
|
||||||
Instruction ins = loadManagedInstance(code, true);
|
loadManagedInstance(code, true);
|
||||||
code.getfield().setField(SM, SMTYPE);
|
code.getfield().setField(SM, SMTYPE);
|
||||||
JumpInstruction ifins = code.ifnonnull();
|
JumpInstruction ifins = code.ifnonnull();
|
||||||
loadManagedInstance(code, true);
|
loadManagedInstance(code, true);
|
||||||
|
@ -2868,7 +2868,7 @@ public class PCEnhancer {
|
||||||
int firstParamOffset = getAccessorParameterOffset();
|
int firstParamOffset = getAccessorParameterOffset();
|
||||||
|
|
||||||
// if (inst.pcStateManager == null) inst.<field> = value;
|
// if (inst.pcStateManager == null) inst.<field> = value;
|
||||||
Instruction ins = loadManagedInstance(code, true);
|
loadManagedInstance(code, true);
|
||||||
code.getfield().setField(SM, SMTYPE);
|
code.getfield().setField(SM, SMTYPE);
|
||||||
JumpInstruction ifins = code.ifnonnull();
|
JumpInstruction ifins = code.ifnonnull();
|
||||||
loadManagedInstance(code, true);
|
loadManagedInstance(code, true);
|
||||||
|
@ -3594,7 +3594,8 @@ public class PCEnhancer {
|
||||||
Class cls;
|
Class cls;
|
||||||
for (Iterator itr = classes.iterator(); itr.hasNext();) {
|
for (Iterator itr = classes.iterator(); itr.hasNext();) {
|
||||||
cls = (Class) itr.next();
|
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);
|
bc = project.loadClass(cls);
|
||||||
enhancer = new PCEnhancer(conf, bc, repos);
|
enhancer = new PCEnhancer(conf, bc, repos);
|
||||||
|
@ -3603,12 +3604,15 @@ public class PCEnhancer {
|
||||||
enhancer.setDirectory(flags.directory);
|
enhancer.setDirectory(flags.directory);
|
||||||
enhancer.setAddDefaultConstructor(flags.addDefaultConstructor);
|
enhancer.setAddDefaultConstructor(flags.addDefaultConstructor);
|
||||||
status = enhancer.run();
|
status = enhancer.run();
|
||||||
if (status == ENHANCE_NONE)
|
if (status == ENHANCE_NONE) {
|
||||||
log.info(_loc.get("enhance-norun"));
|
if (log.isTraceEnabled())
|
||||||
else if (status == ENHANCE_INTERFACE)
|
log.trace(_loc.get("enhance-norun"));
|
||||||
log.info(_loc.get("enhance-interface"));
|
} else if (status == ENHANCE_INTERFACE) {
|
||||||
else if (status == ENHANCE_AWARE) {
|
if (log.isTraceEnabled())
|
||||||
log.info(_loc.get("enhance-aware"));
|
log.trace(_loc.get("enhance-interface"));
|
||||||
|
} else if (status == ENHANCE_AWARE) {
|
||||||
|
if (log.isTraceEnabled())
|
||||||
|
log.trace(_loc.get("enhance-aware"));
|
||||||
enhancer.record();
|
enhancer.record();
|
||||||
} else
|
} else
|
||||||
enhancer.record();
|
enhancer.record();
|
||||||
|
|
|
@ -582,8 +582,8 @@ public abstract class AbstractCFMetaDataFactory
|
||||||
else // we don't cache a full dev cp scan
|
else // we don't cache a full dev cp scan
|
||||||
_typeNames = names;
|
_typeNames = names;
|
||||||
|
|
||||||
if (log.isInfoEnabled())
|
if (log.isTraceEnabled())
|
||||||
log.info(_loc.get("found-pcs", String.valueOf(names.size()),
|
log.trace(_loc.get("found-pcs", String.valueOf(names.size()),
|
||||||
String.valueOf(System.currentTimeMillis() - start)));
|
String.valueOf(System.currentTimeMillis() - start)));
|
||||||
return (names.isEmpty()) ? null : names;
|
return (names.isEmpty()) ? null : names;
|
||||||
} catch (IOException ioe) {
|
} catch (IOException ioe) {
|
||||||
|
|
|
@ -326,15 +326,15 @@ public abstract class XMLMetaDataParser extends DefaultHandler
|
||||||
*/
|
*/
|
||||||
protected void parseNewResource(Reader xml, String sourceName)
|
protected void parseNewResource(Reader xml, String sourceName)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
if (_log != null && _log.isInfoEnabled())
|
if (_log != null && _log.isTraceEnabled())
|
||||||
_log.info(_loc.get("start-parse", sourceName));
|
_log.trace(_loc.get("start-parse", sourceName));
|
||||||
|
|
||||||
// even if we want to validate, specify that it won't happen
|
// even if we want to validate, specify that it won't happen
|
||||||
// if we have neither a DocType not a Schema
|
// if we have neither a DocType not a Schema
|
||||||
Object schemaSource = getSchemaSource();
|
Object schemaSource = getSchemaSource();
|
||||||
if (schemaSource != null && _schemaBug) {
|
if (schemaSource != null && _schemaBug) {
|
||||||
if (_log != null && _log.isInfoEnabled())
|
if (_log != null && _log.isTraceEnabled())
|
||||||
_log.info(_loc.get("parser-schema-bug"));
|
_log.trace(_loc.get("parser-schema-bug"));
|
||||||
schemaSource = null;
|
schemaSource = null;
|
||||||
}
|
}
|
||||||
boolean validating = _validating && (getDocType() != null
|
boolean validating = _validating && (getDocType() != null
|
||||||
|
|
|
@ -197,8 +197,8 @@ public class AnnotationPersistenceMappingParser
|
||||||
throw new MetaDataException(_loc.get("no-gen-name", el));
|
throw new MetaDataException(_loc.get("no-gen-name", el));
|
||||||
|
|
||||||
Log log = getLog();
|
Log log = getLog();
|
||||||
if (log.isInfoEnabled())
|
if (log.isTraceEnabled())
|
||||||
log.info(_loc.get("parse-gen", name));
|
log.trace(_loc.get("parse-gen", name));
|
||||||
|
|
||||||
SequenceMapping meta = (SequenceMapping) getRepository().
|
SequenceMapping meta = (SequenceMapping) getRepository().
|
||||||
getCachedSequenceMetaData(name);
|
getCachedSequenceMetaData(name);
|
||||||
|
@ -481,8 +481,8 @@ public class AnnotationPersistenceMappingParser
|
||||||
MappingRepository repos = (MappingRepository) getRepository();
|
MappingRepository repos = (MappingRepository) getRepository();
|
||||||
Log log = getLog();
|
Log log = getLog();
|
||||||
for (SqlResultSetMapping anno : annos) {
|
for (SqlResultSetMapping anno : annos) {
|
||||||
if (log.isInfoEnabled())
|
if (log.isTraceEnabled())
|
||||||
log.info(_loc.get("parse-sqlrsmapping", anno.name()));
|
log.trace(_loc.get("parse-sqlrsmapping", anno.name()));
|
||||||
|
|
||||||
QueryResultMapping result = repos.getCachedQueryResultMapping
|
QueryResultMapping result = repos.getCachedQueryResultMapping
|
||||||
(null, anno.name());
|
(null, anno.name());
|
||||||
|
|
|
@ -370,8 +370,8 @@ public class XMLPersistenceMappingParser
|
||||||
private boolean startTableGenerator(Attributes attrs) {
|
private boolean startTableGenerator(Attributes attrs) {
|
||||||
String name = attrs.getValue("name");
|
String name = attrs.getValue("name");
|
||||||
Log log = getLog();
|
Log log = getLog();
|
||||||
if (log.isInfoEnabled())
|
if (log.isTraceEnabled())
|
||||||
log.info(_loc.get("parse-gen", name));
|
log.trace(_loc.get("parse-gen", name));
|
||||||
if (getRepository().getCachedSequenceMetaData(name) != null
|
if (getRepository().getCachedSequenceMetaData(name) != null
|
||||||
&& log.isWarnEnabled())
|
&& log.isWarnEnabled())
|
||||||
log.warn(_loc.get("override-gen", name));
|
log.warn(_loc.get("override-gen", name));
|
||||||
|
@ -781,8 +781,8 @@ public class XMLPersistenceMappingParser
|
||||||
private boolean startSQLResultSetMapping(Attributes attrs) {
|
private boolean startSQLResultSetMapping(Attributes attrs) {
|
||||||
String name = attrs.getValue("name");
|
String name = attrs.getValue("name");
|
||||||
Log log = getLog();
|
Log log = getLog();
|
||||||
if (log.isInfoEnabled())
|
if (log.isTraceEnabled())
|
||||||
log.info(_loc.get("parse-sqlrsmapping", name));
|
log.trace(_loc.get("parse-sqlrsmapping", name));
|
||||||
|
|
||||||
MappingRepository repos = (MappingRepository) getRepository();
|
MappingRepository repos = (MappingRepository) getRepository();
|
||||||
QueryResultMapping result = repos.getCachedQueryResultMapping
|
QueryResultMapping result = repos.getCachedQueryResultMapping
|
||||||
|
|
|
@ -335,8 +335,8 @@ public class AnnotationPersistenceMetaDataParser
|
||||||
* Parse persistence metadata for the given class.
|
* Parse persistence metadata for the given class.
|
||||||
*/
|
*/
|
||||||
public void parse(Class cls) {
|
public void parse(Class cls) {
|
||||||
if (_log.isInfoEnabled())
|
if (_log.isTraceEnabled())
|
||||||
_log.info(_loc.get("parse-class", cls.getName()));
|
_log.trace(_loc.get("parse-class", cls.getName()));
|
||||||
|
|
||||||
_cls = cls;
|
_cls = cls;
|
||||||
try {
|
try {
|
||||||
|
@ -369,8 +369,8 @@ public class AnnotationPersistenceMetaDataParser
|
||||||
return;
|
return;
|
||||||
|
|
||||||
int pkgMode = getSourceMode(pkg);
|
int pkgMode = getSourceMode(pkg);
|
||||||
if (pkgMode == 0 && _log.isInfoEnabled())
|
if (pkgMode == 0 && _log.isTraceEnabled())
|
||||||
_log.info(_loc.get("parse-package", _cls.getName()));
|
_log.trace(_loc.get("parse-package", _cls.getName()));
|
||||||
if ((pkgMode & _mode) == _mode) // already visited
|
if ((pkgMode & _mode) == _mode) // already visited
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -1440,8 +1440,8 @@ public class AnnotationPersistenceMetaDataParser
|
||||||
if (StringUtils.isEmpty(name))
|
if (StringUtils.isEmpty(name))
|
||||||
throw new MetaDataException(_loc.get("no-seq-name", el));
|
throw new MetaDataException(_loc.get("no-seq-name", el));
|
||||||
|
|
||||||
if (_log.isInfoEnabled())
|
if (_log.isTraceEnabled())
|
||||||
_log.info(_loc.get("parse-sequence", name));
|
_log.trace(_loc.get("parse-sequence", name));
|
||||||
|
|
||||||
SequenceMetaData meta = getRepository().getCachedSequenceMetaData
|
SequenceMetaData meta = getRepository().getCachedSequenceMetaData
|
||||||
(name);
|
(name);
|
||||||
|
@ -1495,8 +1495,8 @@ public class AnnotationPersistenceMetaDataParser
|
||||||
throw new MetaDataException(_loc.get("no-query-string",
|
throw new MetaDataException(_loc.get("no-query-string",
|
||||||
query.name(), el));
|
query.name(), el));
|
||||||
|
|
||||||
if (_log.isInfoEnabled())
|
if (_log.isTraceEnabled())
|
||||||
_log.info(_loc.get("parse-query", query.name()));
|
_log.trace(_loc.get("parse-query", query.name()));
|
||||||
|
|
||||||
meta = getRepository().getCachedQueryMetaData(null, query.name());
|
meta = getRepository().getCachedQueryMetaData(null, query.name());
|
||||||
if (meta != null) {
|
if (meta != null) {
|
||||||
|
@ -1536,8 +1536,8 @@ public class AnnotationPersistenceMetaDataParser
|
||||||
throw new MetaDataException(_loc.get("no-native-query-string",
|
throw new MetaDataException(_loc.get("no-native-query-string",
|
||||||
query.name(), el));
|
query.name(), el));
|
||||||
|
|
||||||
if (_log.isInfoEnabled())
|
if (_log.isTraceEnabled())
|
||||||
_log.info(_loc.get("parse-native-query", query.name()));
|
_log.trace(_loc.get("parse-native-query", query.name()));
|
||||||
|
|
||||||
meta = getRepository().getCachedQueryMetaData(null, query.name());
|
meta = getRepository().getCachedQueryMetaData(null, query.name());
|
||||||
if (meta != null) {
|
if (meta != null) {
|
||||||
|
|
|
@ -727,8 +727,8 @@ public class XMLPersistenceMetaDataParser
|
||||||
}
|
}
|
||||||
|
|
||||||
Log log = getLog();
|
Log log = getLog();
|
||||||
if (log.isInfoEnabled())
|
if (log.isTraceEnabled())
|
||||||
log.info(_loc.get("parse-class", _cls.getName()));
|
log.trace(_loc.get("parse-class", _cls.getName()));
|
||||||
|
|
||||||
MetaDataRepository repos = getRepository();
|
MetaDataRepository repos = getRepository();
|
||||||
ClassMetaData meta = repos.getCachedMetaData(_cls);
|
ClassMetaData meta = repos.getCachedMetaData(_cls);
|
||||||
|
@ -853,8 +853,8 @@ public class XMLPersistenceMetaDataParser
|
||||||
|
|
||||||
String name = attrs.getValue("name");
|
String name = attrs.getValue("name");
|
||||||
Log log = getLog();
|
Log log = getLog();
|
||||||
if (log.isInfoEnabled())
|
if (log.isTraceEnabled())
|
||||||
log.info(_loc.get("parse-sequence", name));
|
log.trace(_loc.get("parse-sequence", name));
|
||||||
|
|
||||||
SequenceMetaData meta = getRepository().getCachedSequenceMetaData(name);
|
SequenceMetaData meta = getRepository().getCachedSequenceMetaData(name);
|
||||||
if (meta != null && log.isWarnEnabled())
|
if (meta != null && log.isWarnEnabled())
|
||||||
|
@ -1373,8 +1373,8 @@ public class XMLPersistenceMetaDataParser
|
||||||
|
|
||||||
String name = attrs.getValue("name");
|
String name = attrs.getValue("name");
|
||||||
Log log = getLog();
|
Log log = getLog();
|
||||||
if (log.isInfoEnabled())
|
if (log.isTraceEnabled())
|
||||||
log.info(_loc.get("parse-query", name));
|
log.trace(_loc.get("parse-query", name));
|
||||||
|
|
||||||
QueryMetaData meta = getRepository().getCachedQueryMetaData(null, name);
|
QueryMetaData meta = getRepository().getCachedQueryMetaData(null, name);
|
||||||
if (meta != null && log.isWarnEnabled())
|
if (meta != null && log.isWarnEnabled())
|
||||||
|
@ -1439,8 +1439,8 @@ public class XMLPersistenceMetaDataParser
|
||||||
|
|
||||||
String name = attrs.getValue("name");
|
String name = attrs.getValue("name");
|
||||||
Log log = getLog();
|
Log log = getLog();
|
||||||
if (log.isInfoEnabled())
|
if (log.isTraceEnabled())
|
||||||
log.info(_loc.get("parse-native-query", name));
|
log.trace(_loc.get("parse-native-query", name));
|
||||||
|
|
||||||
QueryMetaData meta = getRepository().getCachedQueryMetaData(null, name);
|
QueryMetaData meta = getRepository().getCachedQueryMetaData(null, name);
|
||||||
if (meta != null && log.isWarnEnabled())
|
if (meta != null && log.isWarnEnabled())
|
||||||
|
|
Loading…
Reference in New Issue