Commit 417999d7 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

1. Improved logging information.

2. Added #toString().


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@1313 b35dd754-fafc-0310-a699-88a17e54d16e
parent b40c2163
...@@ -205,7 +205,8 @@ public class SocketConnection implements Connection { ...@@ -205,7 +205,8 @@ public class SocketConnection implements Connection {
} }
} }
catch (Exception e) { catch (Exception e) {
// Do nothing Log.error(LocaleUtils.getLocalizedString("admin.error.close")
+ "\n" + this.toString(), e);
} }
try { try {
socket.close(); socket.close();
...@@ -235,7 +236,8 @@ public class SocketConnection implements Connection { ...@@ -235,7 +236,8 @@ public class SocketConnection implements Connection {
xmlSerializer.flush(); xmlSerializer.flush();
} }
catch (IOException e) { catch (IOException e) {
Log.warn(e); Log.warn(LocaleUtils.getLocalizedString("admin.error.close")
+ "\n" + this.toString(), e);
close(); close();
// Retry sending the packet again. Most probably if the packet is a // Retry sending the packet again. Most probably if the packet is a
// Message it will be stored offline // Message it will be stored offline
...@@ -265,4 +267,8 @@ public class SocketConnection implements Connection { ...@@ -265,4 +267,8 @@ public class SocketConnection implements Connection {
} }
} }
} }
public String toString() {
return super.toString() + " socket: " + socket + " session: " + session;
}
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment