From 27b619d59bc299baf88c2dc735231e5480858ffe Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Wed, 10 Sep 2008 18:01:24 +0000 Subject: [PATCH] Let's log a stack trace on lazy initialization so that we can see who the culprit is. --- src/java/com/samskivert/jdbc/depot/PersistenceContext.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/java/com/samskivert/jdbc/depot/PersistenceContext.java b/src/java/com/samskivert/jdbc/depot/PersistenceContext.java index 7964237..9e77021 100644 --- a/src/java/com/samskivert/jdbc/depot/PersistenceContext.java +++ b/src/java/com/samskivert/jdbc/depot/PersistenceContext.java @@ -227,7 +227,8 @@ public class PersistenceContext // underlying persistent object marshaller.init(this); if (marshaller.getTableName() != null && _warnOnLazyInit) { - log.warning("Record initialized lazily [type=" + type.getName() + "]."); + log.warning("Record initialized lazily", "type", type.getName(), + new Exception()); } } } catch (DatabaseException pe) {