{"action":"created","issue":{"url":"https://api.github.com/repos/frostwire/frostwire-jlibtorrent/issues/42","labels_url":"https://api.github.com/repos/frostwire/frostwire-jlibtorrent/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/frostwire/frostwire-jlibtorrent/issues/42/comments","events_url":"https://api.github.com/repos/frostwire/frostwire-jlibtorrent/issues/42/events","html_url":"https://github.com/frostwire/frostwire-jlibtorrent/issues/42","id":100341722,"number":42,"title":"How to turn on PeerLog alerts/ Peer Logging?","user":{"login":"tchoulihan","id":930215,"avatar_url":"https://avatars.githubusercontent.com/u/930215?v=3","gravatar_id":"","url":"https://api.github.com/users/tchoulihan","html_url":"https://github.com/tchoulihan","followers_url":"https://api.github.com/users/tchoulihan/followers","following_url":"https://api.github.com/users/tchoulihan/following{/other_user}","gists_url":"https://api.github.com/users/tchoulihan/gists{/gist_id}","starred_url":"https://api.github.com/users/tchoulihan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tchoulihan/subscriptions","organizations_url":"https://api.github.com/users/tchoulihan/orgs","repos_url":"https://api.github.com/users/tchoulihan/repos","events_url":"https://api.github.com/users/tchoulihan/events{/privacy}","received_events_url":"https://api.github.com/users/tchoulihan/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-11T15:42:08Z","updated_at":"2015-08-11T16:31:54Z","closed_at":"2015-08-11T16:26:51Z","body":"@arvidn is recommending that I do some logging of PeerLog, and I have the code to do them, but I don't know how to turn the logging on. \r\n\r\nHe told me : \r\n> In 1.1.0 you don't need to rebuild libtorrent to enable verbose peer logging, they are alerts now that can be enabled with an alert mask flag.\r\n\r\nHere's my code thats not doing anything :( \r\n```java\r\n\t\tsession.addListener(new AlertListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic int[] types() {\r\n\t\t\t\treturn new int[]{AlertType.SESSION_STATS.getSwig(), AlertType.PEER_LOG.getSwig()};\r\n\t\t\t\t\r\n\t\t\t}\r\n@Override\r\npublic void alert(Alert<?> alert) {\r\n   if (alert instanceof PeerLogAlert) {\r\n\t\t\t\t\t\tlog.debug(\"peer log alert\");\r\n\t\t\t\t\t\tlog.debug(alert.getType() + \" - \" + alert.getSwig().what() + \" - \" + alert.getSwig().message());\r\n\t\t\t\t\t\tlog.debug(((PeerLogAlert) alert).eventType());\r\n\t\t\t\t\t\tlog.debug(((PeerLogAlert) alert).direction().toString());\r\n\t\t\t\t\t\tlog.debug(((PeerLogAlert) alert).getPeerId().toString());\r\n\t\t\t\t\t\tlog.debug(((PeerLogAlert) alert).getPeerIP().toString());\r\n\t\t\t\t\t}\r\n```"},"comment":{"url":"https://api.github.com/repos/frostwire/frostwire-jlibtorrent/issues/comments/129957606","html_url":"https://github.com/frostwire/frostwire-jlibtorrent/issues/42#issuecomment-129957606","issue_url":"https://api.github.com/repos/frostwire/frostwire-jlibtorrent/issues/42","id":129957606,"user":{"login":"tchoulihan","id":930215,"avatar_url":"https://avatars.githubusercontent.com/u/930215?v=3","gravatar_id":"","url":"https://api.github.com/users/tchoulihan","html_url":"https://github.com/tchoulihan","followers_url":"https://api.github.com/users/tchoulihan/followers","following_url":"https://api.github.com/users/tchoulihan/following{/other_user}","gists_url":"https://api.github.com/users/tchoulihan/gists{/gist_id}","starred_url":"https://api.github.com/users/tchoulihan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tchoulihan/subscriptions","organizations_url":"https://api.github.com/users/tchoulihan/orgs","repos_url":"https://api.github.com/users/tchoulihan/repos","events_url":"https://api.github.com/users/tchoulihan/events{/privacy}","received_events_url":"https://api.github.com/users/tchoulihan/received_events","type":"User","site_admin":false},"created_at":"2015-08-11T16:31:54Z","updated_at":"2015-08-11T16:31:54Z","body":"@aldenml Thanks! Do you guys have some sample values for some of those params. I have no idea what `iface` for example should be:\r\n\r\n`Session(Fingerprint print, Pair<Integer, Integer> prange, String iface, List<Pair<String, Integer>> routers, boolean logging)`"}}