{"action":"created","comment":{"url":"https://api.github.com/repos/opendatakit/javarosa/pulls/comments/176500679","pull_request_review_id":106216063,"id":176500679,"diff_hunk":"@@ -15,38 +15,69 @@\n  */\n \n /**\n- * \n+ *\n  */\n package org.javarosa.core.api;\n \n-import org.javarosa.core.log.IFullLogSerializer;\n-import org.javarosa.core.log.StreamLogSerializer;\n-\n import java.io.IOException;\n import java.util.Date;\n+import org.javarosa.core.log.IFullLogSerializer;\n+import org.javarosa.core.log.StreamLogSerializer;\n \n /**\n  * IIncidentLogger's are used for instrumenting applications to identify usage\n  * patterns, usability errors, and general trajectories through applications.\n- * \n- * @author Clayton Sims\n- * @date Apr 10, 2009 \n  *\n+ * @author Clayton Sims\n+ * @deprecated Use {@link org.slf4j.LoggerFactory#getLogger(Class)} instead\n  */\n+@Deprecated","path":"src/org/javarosa/core/api/ILogger.java","position":27,"original_position":27,"commit_id":"3f6c303bdcf792f3e2e9d5f0929e003e87a3a971","original_commit_id":"3f6c303bdcf792f3e2e9d5f0929e003e87a3a971","user":{"login":"ggalmazor","id":205913,"avatar_url":"https://avatars0.githubusercontent.com/u/205913?v=4","gravatar_id":"","url":"https://api.github.com/users/ggalmazor","html_url":"https://github.com/ggalmazor","followers_url":"https://api.github.com/users/ggalmazor/followers","following_url":"https://api.github.com/users/ggalmazor/following{/other_user}","gists_url":"https://api.github.com/users/ggalmazor/gists{/gist_id}","starred_url":"https://api.github.com/users/ggalmazor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ggalmazor/subscriptions","organizations_url":"https://api.github.com/users/ggalmazor/orgs","repos_url":"https://api.github.com/users/ggalmazor/repos","events_url":"https://api.github.com/users/ggalmazor/events{/privacy}","received_events_url":"https://api.github.com/users/ggalmazor/received_events","type":"User","site_admin":false},"body":"It's just a pretext to add the `@deprecated` JavaDoc so that anyone ctrl-clicking gets information about an alternative...","created_at":"2018-03-22T17:11:30Z","updated_at":"2018-03-22T17:11:30Z","html_url":"https://github.com/opendatakit/javarosa/pull/259#discussion_r176500679","pull_request_url":"https://api.github.com/repos/opendatakit/javarosa/pulls/259","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/opendatakit/javarosa/pulls/comments/176500679"},"html":{"href":"https://github.com/opendatakit/javarosa/pull/259#discussion_r176500679"},"pull_request":{"href":"https://api.github.com/repos/opendatakit/javarosa/pulls/259"}},"in_reply_to_id":176499919},"pull_request":{"url":"https://api.github.com/repos/opendatakit/javarosa/pulls/259","id":170729902,"html_url":"https://github.com/opendatakit/javarosa/pull/259","diff_url":"https://github.com/opendatakit/javarosa/pull/259.diff","patch_url":"https://github.com/opendatakit/javarosa/pull/259.patch","issue_url":"https://api.github.com/repos/opendatakit/javarosa/issues/259","number":259,"state":"open","locked":false,"title":"Issue 152 slf4j migration","user":{"login":"ggalmazor","id":205913,"avatar_url":"https://avatars0.githubusercontent.com/u/205913?v=4","gravatar_id":"","url":"https://api.github.com/users/ggalmazor","html_url":"https://github.com/ggalmazor","followers_url":"https://api.github.com/users/ggalmazor/followers","following_url":"https://api.github.com/users/ggalmazor/following{/other_user}","gists_url":"https://api.github.com/users/ggalmazor/gists{/gist_id}","starred_url":"https://api.github.com/users/ggalmazor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ggalmazor/subscriptions","organizations_url":"https://api.github.com/users/ggalmazor/orgs","repos_url":"https://api.github.com/users/ggalmazor/repos","events_url":"https://api.github.com/users/ggalmazor/events{/privacy}","received_events_url":"https://api.github.com/users/ggalmazor/received_events","type":"User","site_admin":false},"body":"Closes #152 \r\n\r\nThis PR adds SLF4J API to the project and Logback binding only for the tests.\r\n\r\nAll the code that was directly or indirectly using `System.out` and `System.err` has been migrated to SLF4J.\r\n\r\nAs a consequence, first, deprecation flags have been added to some public artifacts. Then any unused deprecated artifact has been removed. This is also discussed in #52:\r\n- `org.javarosa.core.api.ILogger`\r\n- `org.javarosa.core.io.Std`\r\n- `org.javarosa.core.io.StreamsUtil`\r\n- `org.javarosa.core.services.Logger`\r\n- `org.javarosa.core.util.CodeTimer`\r\n- `org.javarosa.xform.parse.XFormParserReporter`\r\n  - There's a coupling issue with this class. It's used by `FormParserHelper` for logging **and** error handling:\r\n\r\n    ```java\r\n    public static ParseResult parse(Path formName) throws IOException {\r\n        XFormParser parser = new XFormParser(new FileReader(formName.toString()));\r\n        final List<String> errorMessages = new ArrayList<>();\r\n        parser.attachReporter(new XFormParserReporter() {\r\n            @Override\r\n            public void warning(String type, String message, String xmlLocation) {\r\n                errorMessages.add(message);\r\n                super.warning(type, message, xmlLocation);\r\n            }\r\n    \r\n            @Override\r\n            public void error(String message) {\r\n                errorMessages.add(message);\r\n                super.error(message);\r\n            }\r\n        });\r\n    \r\n        return new ParseResult(parser.parse(), errorMessages);\r\n    }\r\n    ```\r\n\r\n    This is the only special use of `XFormParserReporter` that requires a change on the API. The solution I propose is to add into `XFormParser` a pair of `onWarning` and `onError` methods:\r\n\r\n    ```java\r\n    public static ParseResult parse(Path formName) throws IOException {\r\n        XFormParser parser = new XFormParser(new FileReader(formName.toString()));\r\n        final List<String> errorMessages = new ArrayList<>();\r\n        parser.onWarning(new XFormParser.WarningCallback() {\r\n            @Override\r\n            public void accept(String type, String message, String xmlLocation) {\r\n                errorMessages.add(message);\r\n            }\r\n        });\r\n        parser.onError(new XFormParser.ErrorCallback() {\r\n            @Override\r\n            public void accept(String message) {\r\n                errorMessages.add(message);\r\n            }\r\n        });\r\n        return new ParseResult(parser.parse(), errorMessages);\r\n    }\r\n    ```\r\n#### What has been done to verify that this works as intended?\r\nCompiled project and ran automated tests.\r\n\r\n#### Why is this the best possible solution? Were any other approaches considered?\r\nI tried to do the minimum amount of changes to do a meaningful migration to slf4j\r\n\r\n#### Are there any risks to merging this code? If so, what are they?\r\nRemoval of public artifacts has to be explicitly documented on any release note of a JR release that includes this PR\r\n\r\nAny error introduced by migrating manual log message variable interpolation to SLF4J's `{}` placeholder syntax. I manually reviewed this three times but there's a risk here of losing information on logs or getting unexpected changes on current log lines.","created_at":"2018-02-22T11:54:45Z","updated_at":"2018-03-22T17:11:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7ce1bf2b77592925fd4bc80c3ca5c31d8d13db5c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":688526438,"url":"https://api.github.com/repos/opendatakit/javarosa/labels/reviewed","name":"reviewed","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/opendatakit/javarosa/pulls/259/commits","review_comments_url":"https://api.github.com/repos/opendatakit/javarosa/pulls/259/comments","review_comment_url":"https://api.github.com/repos/opendatakit/javarosa/pulls/comments{/number}","comments_url":"https://api.github.com/repos/opendatakit/javarosa/issues/259/comments","statuses_url":"https://api.github.com/repos/opendatakit/javarosa/statuses/3f6c303bdcf792f3e2e9d5f0929e003e87a3a971","head":{"label":"ggalmazor:issue_152_slf4j_migration","ref":"issue_152_slf4j_migration","sha":"3f6c303bdcf792f3e2e9d5f0929e003e87a3a971","user":{"login":"ggalmazor","id":205913,"avatar_url":"https://avatars0.githubusercontent.com/u/205913?v=4","gravatar_id":"","url":"https://api.github.com/users/ggalmazor","html_url":"https://github.com/ggalmazor","followers_url":"https://api.github.com/users/ggalmazor/followers","following_url":"https://api.github.com/users/ggalmazor/following{/other_user}","gists_url":"https://api.github.com/users/ggalmazor/gists{/gist_id}","starred_url":"https://api.github.com/users/ggalmazor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ggalmazor/subscriptions","organizations_url":"https://api.github.com/users/ggalmazor/orgs","repos_url":"https://api.github.com/users/ggalmazor/repos","events_url":"https://api.github.com/users/ggalmazor/events{/privacy}","received_events_url":"https://api.github.com/users/ggalmazor/received_events","type":"User","site_admin":false},"repo":{"id":106079185,"name":"javarosa","full_name":"ggalmazor/javarosa","owner":{"login":"ggalmazor","id":205913,"avatar_url":"https://avatars0.githubusercontent.com/u/205913?v=4","gravatar_id":"","url":"https://api.github.com/users/ggalmazor","html_url":"https://github.com/ggalmazor","followers_url":"https://api.github.com/users/ggalmazor/followers","following_url":"https://api.github.com/users/ggalmazor/following{/other_user}","gists_url":"https://api.github.com/users/ggalmazor/gists{/gist_id}","starred_url":"https://api.github.com/users/ggalmazor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ggalmazor/subscriptions","organizations_url":"https://api.github.com/users/ggalmazor/orgs","repos_url":"https://api.github.com/users/ggalmazor/repos","events_url":"https://api.github.com/users/ggalmazor/events{/privacy}","received_events_url":"https://api.github.com/users/ggalmazor/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ggalmazor/javarosa","description":"The core library that many of the ODK tools are built around. It's written in Java, implements the ODK XForms spec, and runs on mobile devices and cloud servers. ✨🏗✨","fork":true,"url":"https://api.github.com/repos/ggalmazor/javarosa","forks_url":"https://api.github.com/repos/ggalmazor/javarosa/forks","keys_url":"https://api.github.com/repos/ggalmazor/javarosa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ggalmazor/javarosa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ggalmazor/javarosa/teams","hooks_url":"https://api.github.com/repos/ggalmazor/javarosa/hooks","issue_events_url":"https://api.github.com/repos/ggalmazor/javarosa/issues/events{/number}","events_url":"https://api.github.com/repos/ggalmazor/javarosa/events","assignees_url":"https://api.github.com/repos/ggalmazor/javarosa/assignees{/user}","branches_url":"https://api.github.com/repos/ggalmazor/javarosa/branches{/branch}","tags_url":"https://api.github.com/repos/ggalmazor/javarosa/tags","blobs_url":"https://api.github.com/repos/ggalmazor/javarosa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ggalmazor/javarosa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ggalmazor/javarosa/git/refs{/sha}","trees_url":"https://api.github.com/repos/ggalmazor/javarosa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ggalmazor/javarosa/statuses/{sha}","languages_url":"https://api.github.com/repos/ggalmazor/javarosa/languages","stargazers_url":"https://api.github.com/repos/ggalmazor/javarosa/stargazers","contributors_url":"https://api.github.com/repos/ggalmazor/javarosa/contributors","subscribers_url":"https://api.github.com/repos/ggalmazor/javarosa/subscribers","subscription_url":"https://api.github.com/repos/ggalmazor/javarosa/subscription","commits_url":"https://api.github.com/repos/ggalmazor/javarosa/commits{/sha}","git_commits_url":"https://api.github.com/repos/ggalmazor/javarosa/git/commits{/sha}","comments_url":"https://api.github.com/repos/ggalmazor/javarosa/comments{/number}","issue_comment_url":"https://api.github.com/repos/ggalmazor/javarosa/issues/comments{/number}","contents_url":"https://api.github.com/repos/ggalmazor/javarosa/contents/{+path}","compare_url":"https://api.github.com/repos/ggalmazor/javarosa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ggalmazor/javarosa/merges","archive_url":"https://api.github.com/repos/ggalmazor/javarosa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ggalmazor/javarosa/downloads","issues_url":"https://api.github.com/repos/ggalmazor/javarosa/issues{/number}","pulls_url":"https://api.github.com/repos/ggalmazor/javarosa/pulls{/number}","milestones_url":"https://api.github.com/repos/ggalmazor/javarosa/milestones{/number}","notifications_url":"https://api.github.com/repos/ggalmazor/javarosa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ggalmazor/javarosa/labels{/name}","releases_url":"https://api.github.com/repos/ggalmazor/javarosa/releases{/id}","deployments_url":"https://api.github.com/repos/ggalmazor/javarosa/deployments","created_at":"2017-10-07T07:23:39Z","updated_at":"2017-10-07T07:23:42Z","pushed_at":"2018-03-22T08:50:13Z","git_url":"git://github.com/ggalmazor/javarosa.git","ssh_url":"git@github.com:ggalmazor/javarosa.git","clone_url":"https://github.com/ggalmazor/javarosa.git","svn_url":"https://github.com/ggalmazor/javarosa","homepage":"","size":8002,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"opendatakit:master","ref":"master","sha":"6ac8eefbc024dff19f0c6cc5c7ef6a9a801cc335","user":{"login":"opendatakit","id":6222985,"avatar_url":"https://avatars0.githubusercontent.com/u/6222985?v=4","gravatar_id":"","url":"https://api.github.com/users/opendatakit","html_url":"https://github.com/opendatakit","followers_url":"https://api.github.com/users/opendatakit/followers","following_url":"https://api.github.com/users/opendatakit/following{/other_user}","gists_url":"https://api.github.com/users/opendatakit/gists{/gist_id}","starred_url":"https://api.github.com/users/opendatakit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opendatakit/subscriptions","organizations_url":"https://api.github.com/users/opendatakit/orgs","repos_url":"https://api.github.com/users/opendatakit/repos","events_url":"https://api.github.com/users/opendatakit/events{/privacy}","received_events_url":"https://api.github.com/users/opendatakit/received_events","type":"Organization","site_admin":false},"repo":{"id":66836598,"name":"javarosa","full_name":"opendatakit/javarosa","owner":{"login":"opendatakit","id":6222985,"avatar_url":"https://avatars0.githubusercontent.com/u/6222985?v=4","gravatar_id":"","url":"https://api.github.com/users/opendatakit","html_url":"https://github.com/opendatakit","followers_url":"https://api.github.com/users/opendatakit/followers","following_url":"https://api.github.com/users/opendatakit/following{/other_user}","gists_url":"https://api.github.com/users/opendatakit/gists{/gist_id}","starred_url":"https://api.github.com/users/opendatakit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opendatakit/subscriptions","organizations_url":"https://api.github.com/users/opendatakit/orgs","repos_url":"https://api.github.com/users/opendatakit/repos","events_url":"https://api.github.com/users/opendatakit/events{/privacy}","received_events_url":"https://api.github.com/users/opendatakit/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opendatakit/javarosa","description":"The core library that many of the ODK tools are built around. It's written in Java, implements the ODK XForms spec, and runs on mobile devices and cloud servers. ✨🏗✨","fork":false,"url":"https://api.github.com/repos/opendatakit/javarosa","forks_url":"https://api.github.com/repos/opendatakit/javarosa/forks","keys_url":"https://api.github.com/repos/opendatakit/javarosa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opendatakit/javarosa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opendatakit/javarosa/teams","hooks_url":"https://api.github.com/repos/opendatakit/javarosa/hooks","issue_events_url":"https://api.github.com/repos/opendatakit/javarosa/issues/events{/number}","events_url":"https://api.github.com/repos/opendatakit/javarosa/events","assignees_url":"https://api.github.com/repos/opendatakit/javarosa/assignees{/user}","branches_url":"https://api.github.com/repos/opendatakit/javarosa/branches{/branch}","tags_url":"https://api.github.com/repos/opendatakit/javarosa/tags","blobs_url":"https://api.github.com/repos/opendatakit/javarosa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opendatakit/javarosa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opendatakit/javarosa/git/refs{/sha}","trees_url":"https://api.github.com/repos/opendatakit/javarosa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opendatakit/javarosa/statuses/{sha}","languages_url":"https://api.github.com/repos/opendatakit/javarosa/languages","stargazers_url":"https://api.github.com/repos/opendatakit/javarosa/stargazers","contributors_url":"https://api.github.com/repos/opendatakit/javarosa/contributors","subscribers_url":"https://api.github.com/repos/opendatakit/javarosa/subscribers","subscription_url":"https://api.github.com/repos/opendatakit/javarosa/subscription","commits_url":"https://api.github.com/repos/opendatakit/javarosa/commits{/sha}","git_commits_url":"https://api.github.com/repos/opendatakit/javarosa/git/commits{/sha}","comments_url":"https://api.github.com/repos/opendatakit/javarosa/comments{/number}","issue_comment_url":"https://api.github.com/repos/opendatakit/javarosa/issues/comments{/number}","contents_url":"https://api.github.com/repos/opendatakit/javarosa/contents/{+path}","compare_url":"https://api.github.com/repos/opendatakit/javarosa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opendatakit/javarosa/merges","archive_url":"https://api.github.com/repos/opendatakit/javarosa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opendatakit/javarosa/downloads","issues_url":"https://api.github.com/repos/opendatakit/javarosa/issues{/number}","pulls_url":"https://api.github.com/repos/opendatakit/javarosa/pulls{/number}","milestones_url":"https://api.github.com/repos/opendatakit/javarosa/milestones{/number}","notifications_url":"https://api.github.com/repos/opendatakit/javarosa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opendatakit/javarosa/labels{/name}","releases_url":"https://api.github.com/repos/opendatakit/javarosa/releases{/id}","deployments_url":"https://api.github.com/repos/opendatakit/javarosa/deployments","created_at":"2016-08-29T11:08:59Z","updated_at":"2018-03-21T23:21:53Z","pushed_at":"2018-03-22T08:50:14Z","git_url":"git://github.com/opendatakit/javarosa.git","ssh_url":"git@github.com:opendatakit/javarosa.git","clone_url":"https://github.com/opendatakit/javarosa.git","svn_url":"https://github.com/opendatakit/javarosa","homepage":"","size":8576,"stargazers_count":12,"watchers_count":12,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":28,"mirror_url":null,"archived":false,"open_issues_count":69,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":28,"open_issues":69,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/opendatakit/javarosa/pulls/259"},"html":{"href":"https://github.com/opendatakit/javarosa/pull/259"},"issue":{"href":"https://api.github.com/repos/opendatakit/javarosa/issues/259"},"comments":{"href":"https://api.github.com/repos/opendatakit/javarosa/issues/259/comments"},"review_comments":{"href":"https://api.github.com/repos/opendatakit/javarosa/pulls/259/comments"},"review_comment":{"href":"https://api.github.com/repos/opendatakit/javarosa/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/opendatakit/javarosa/pulls/259/commits"},"statuses":{"href":"https://api.github.com/repos/opendatakit/javarosa/statuses/3f6c303bdcf792f3e2e9d5f0929e003e87a3a971"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"ggalmazor"}}