show exit node info in log

This commit is contained in:
Nathan Freitas 2014-11-29 00:42:51 -05:00
parent 23bc4208d0
commit 2d6c26a999
1 changed files with 11 additions and 0 deletions

View File

@ -1737,6 +1737,17 @@ public class TorService extends Service implements TorServiceConstants, TorConst
mNode.country = jsonRelays.getJSONObject(0).getString("country_name");
mNode.organization = jsonRelays.getJSONObject(0).getString("as_name");
StringBuffer sbInfo = new StringBuffer();
sbInfo.append(mNode.ipAddress);
if (mNode.country != null)
sbInfo.append(' ').append(mNode.country);
if (mNode.organization != null)
sbInfo.append(" (").append(mNode.organization).append(')');
logNotice(sbInfo.toString());
}
reader.close();