]> source.dussan.org Git - vaadin-framework.git/commitdiff
Log stack trace using fine when logging toString warnings
authorArtur Signell <artur@vaadin.com>
Tue, 4 Jun 2013 13:49:24 +0000 (16:49 +0300)
committerVaadin Code Review <review@vaadin.com>
Wed, 5 Jun 2013 07:50:41 +0000 (07:50 +0000)
Change-Id: I4dbb5e84df78bad25fa90fc802309e433d516fd6

server/src/com/vaadin/data/util/LegacyPropertyHelper.java
server/src/com/vaadin/server/Constants.java

index 551d7223d6c17bd8b4a721e77c7429662ce01c7b..76bd57117d55ad5fe48be0babda9eb9e4c75647f 100644 (file)
@@ -60,6 +60,11 @@ public class LegacyPropertyHelper implements Serializable {
         getLogger().log(Level.WARNING,
                 Constants.WARNING_LEGACY_PROPERTY_TOSTRING,
                 p.getClass().getName());
+        if (getLogger().isLoggable(Level.FINE)) {
+            getLogger().log(Level.FINE,
+                    "Strack trace for legacy toString to ease debugging",
+                    new Throwable());
+        }
     }
 
     /**
index cf1031dab2ee48239355bc65b32b876844223411..2c041e3cf8ed3a7dafc58ac5373aa49c2a378d67 100644 (file)
@@ -106,7 +106,8 @@ public interface Constants {
             + "\" to \"true\". To disable the legacy functionality, set \""
             + Constants.SERVLET_PARAMETER_LEGACY_PROPERTY_TOSTRING
             + "\" to false."
-            + " (Note that your debugger might call toString() and trigger this message).";
+            + " (Note that your debugger might call toString() and trigger this message)."
+            + " To find out who is calling toString(), enable FINE level logging.";
 
     static final String WARNING_UNKNOWN_LEGACY_PROPERTY_TOSTRING_VALUE = "Unknown value '{0}' for parameter "
             + Constants.SERVLET_PARAMETER_LEGACY_PROPERTY_TOSTRING