Added logging

pull/205/head
M66B 3 years ago
parent d262fbaa69
commit ae193df6cc

@ -331,7 +331,10 @@ public class SocketFetcher {
String server = props.getProperty("fairemail.server"); String server = props.getProperty("fairemail.server");
if (!TextUtils.isEmpty(server)) if (!TextUtils.isEmpty(server))
iaddr = InetAddress.getByAddress(server, iaddr.getAddress()); iaddr = InetAddress.getByAddress(server, iaddr.getAddress());
eu.faircode.email.Log.i("Socket connect " + iaddr); eu.faircode.email.Log.i("Socket connect " + iaddr +
" timeout=" + cto +
" reuse=" + socket.getReuseAddress() +
" local=" + socket.getLocalSocketAddress());
logger.finest("connecting..."); logger.finest("connecting...");
if (proxyHost != null) if (proxyHost != null)
proxyConnect(socket, proxyHost, proxyPort, proxyConnect(socket, proxyHost, proxyPort,
@ -340,6 +343,9 @@ public class SocketFetcher {
socket.connect(new InetSocketAddress(iaddr, port), cto); socket.connect(new InetSocketAddress(iaddr, port), cto);
else else
socket.connect(new InetSocketAddress(iaddr, port)); socket.connect(new InetSocketAddress(iaddr, port));
eu.faircode.email.Log.i("Socket connected" +
" local=" + socket.getLocalSocketAddress() +
" remote=" + socket.getRemoteSocketAddress());
logger.finest("success!"); logger.finest("success!");
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.FINEST, "connection failed", ex); logger.log(Level.FINEST, "connection failed", ex);

Loading…
Cancel
Save