diff options
author | Jonatan Kronqvist <jonatan.kronqvist@itmill.com> | 2010-10-12 05:07:33 +0000 |
---|---|---|
committer | Jonatan Kronqvist <jonatan.kronqvist@itmill.com> | 2010-10-12 05:07:33 +0000 |
commit | 7e5911687972a2cd0c316b94340810b055ddb106 (patch) | |
tree | c703593af29221d766c669dc598482965708a311 /src/com/vaadin/event | |
parent | 01fe9dbc7d502e91130bbdaf4d7ca138c597abd4 (diff) | |
download | vaadin-framework-7e5911687972a2cd0c316b94340810b055ddb106.tar.gz vaadin-framework-7e5911687972a2cd0c316b94340810b055ddb106.zip |
This is the implementation of the server-side logging feature
- Changed some loglevels according to review
- Don't log unecessary stacktraces in portlets
- printStackTrace:s replaced with JUL logging
- System.out and System.errs replaced with JUL logging
svn changeset:15493/svn branch:6.5
Diffstat (limited to 'src/com/vaadin/event')
-rw-r--r-- | src/com/vaadin/event/ListenerMethod.java | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/com/vaadin/event/ListenerMethod.java b/src/com/vaadin/event/ListenerMethod.java index b294dbf86d..8c7aa93f81 100644 --- a/src/com/vaadin/event/ListenerMethod.java +++ b/src/com/vaadin/event/ListenerMethod.java @@ -11,6 +11,8 @@ import java.lang.reflect.Method; import java.util.Arrays; import java.util.EventListener; import java.util.EventObject; +import java.util.logging.Level; +import java.util.logging.Logger; /** * <p> @@ -41,6 +43,9 @@ import java.util.EventObject; @SuppressWarnings("serial") public class ListenerMethod implements EventListener, Serializable { + private static final Logger logger = Logger.getLogger(ListenerMethod.class + .getName()); + /** * Type of the event that should trigger this listener. Also the subclasses * of this class are accepted to trigger the listener. @@ -50,7 +55,7 @@ public class ListenerMethod implements EventListener, Serializable { /** * The object containing the trigger method. */ - private Object object; + private final Object object; /** * The trigger method to call when an event passing the given criteria @@ -79,10 +84,9 @@ public class ListenerMethod implements EventListener, Serializable { out.writeObject(name); out.writeObject(paramTypes); } catch (NotSerializableException e) { - System.err - .println("Fatal error in serialization of the application: Class " - + object.getClass().getName() - + " must implement serialization."); + logger.severe("Fatal error in serialization of the application: Class " + + object.getClass().getName() + + " must implement serialization."); throw e; } @@ -99,8 +103,7 @@ public class ListenerMethod implements EventListener, Serializable { // inner classes method = findHighestMethod(object.getClass(), name, paramTypes); } catch (SecurityException e) { - System.err.println("Internal deserialization error"); - e.printStackTrace(); + logger.log(Level.SEVERE, "Internal deserialization error", e); } }; |