{"action":"created","comment":{"url":"https://api.github.com/repos/jsdoc3/jsdoc/pulls/comments/27453941","id":27453941,"diff_hunk":"@@ -130,34 +141,26 @@ function addPrefix(args, prefix) {\n     return updatedArgs || args;\n }\n \n-// TODO: document events\n-function wrapLogFunction(name, func) {\n-    var eventName = 'logger:' + name;\n-    var upperCaseName = name.toUpperCase();\n-    var level = LEVELS[upperCaseName];\n-    var prefix = PREFIXES[upperCaseName];\n-\n-    return function() {\n-        var loggerArgs;\n \n-        var args = Array.prototype.slice.call(arguments, 0);\n-\n-        if (logLevel >= level) {\n-            loggerArgs = addPrefix(args, prefix);\n-            func.apply(null, loggerArgs);\n-        }\n+var Logger = function () {\n+    this.handlers = {};","path":"lib/jsdoc/util/logger.js","position":156,"original_position":156,"commit_id":"705f8cf3f0b4bc20519ca2975565968f2e3fc7da","original_commit_id":"705f8cf3f0b4bc20519ca2975565968f2e3fc7da","user":{"login":"theasta","id":92213,"avatar_url":"https://avatars.githubusercontent.com/u/92213?v=3","gravatar_id":"","url":"https://api.github.com/users/theasta","html_url":"https://github.com/theasta","followers_url":"https://api.github.com/users/theasta/followers","following_url":"https://api.github.com/users/theasta/following{/other_user}","gists_url":"https://api.github.com/users/theasta/gists{/gist_id}","starred_url":"https://api.github.com/users/theasta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theasta/subscriptions","organizations_url":"https://api.github.com/users/theasta/orgs","repos_url":"https://api.github.com/users/theasta/repos","events_url":"https://api.github.com/users/theasta/events{/privacy}","received_events_url":"https://api.github.com/users/theasta/received_events","type":"User","site_admin":false},"body":"Yes and no. I get how you want to use the logger which helps a lot. Nonetheless I think that users of the programmatic interface may want to get debugging data by just setting an option. They shouldn't have to require the logger and call setDefaultHandlers on their own to just get it working. \r\nAlso your initial comment was about getting away with `this.handlers`. If I remove it along with setHandlers, how do you want to tie the console.* methods to the different log levels? Do you want to go back to something like the wrapLogFunction instead of the invoke private method? Do you want to use events like in my comment above?","created_at":"2015-03-31T05:28:16Z","updated_at":"2015-03-31T05:28:16Z","html_url":"https://github.com/jsdoc3/jsdoc/pull/960#discussion_r27453941","pull_request_url":"https://api.github.com/repos/jsdoc3/jsdoc/pulls/960","_links":{"self":{"href":"https://api.github.com/repos/jsdoc3/jsdoc/pulls/comments/27453941"},"html":{"href":"https://github.com/jsdoc3/jsdoc/pull/960#discussion_r27453941"},"pull_request":{"href":"https://api.github.com/repos/jsdoc3/jsdoc/pulls/960"}}},"pull_request":{"url":"https://api.github.com/repos/jsdoc3/jsdoc/pulls/960","id":31497802,"html_url":"https://github.com/jsdoc3/jsdoc/pull/960","diff_url":"https://github.com/jsdoc3/jsdoc/pull/960.diff","patch_url":"https://github.com/jsdoc3/jsdoc/pull/960.patch","issue_url":"https://api.github.com/repos/jsdoc3/jsdoc/issues/960","number":960,"state":"open","locked":false,"title":"812 decoupled logger","user":{"login":"theasta","id":92213,"avatar_url":"https://avatars.githubusercontent.com/u/92213?v=3","gravatar_id":"","url":"https://api.github.com/users/theasta","html_url":"https://github.com/theasta","followers_url":"https://api.github.com/users/theasta/followers","following_url":"https://api.github.com/users/theasta/following{/other_user}","gists_url":"https://api.github.com/users/theasta/gists{/gist_id}","starred_url":"https://api.github.com/users/theasta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theasta/subscriptions","organizations_url":"https://api.github.com/users/theasta/orgs","repos_url":"https://api.github.com/users/theasta/repos","events_url":"https://api.github.com/users/theasta/events{/privacy}","received_events_url":"https://api.github.com/users/theasta/received_events","type":"User","site_admin":false},"body":"* Add a logger class that can be extended in the future (for named loggers for example).\r\n* By defaults, handlers (debug, info, error, warn...) are attached to console.* functions if console is defined.\r\n* Handlers can be overridden wit the setHandlers method.\r\n* The pedantic mode is handled internally. The logic has been removed from cli.js\r\n* Come with a lot of tests","created_at":"2015-03-19T06:10:17Z","updated_at":"2015-03-31T05:28:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"acbcd425197a4aee52f1d11fb7aa187705f018aa","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jsdoc3/jsdoc/pulls/960/commits","review_comments_url":"https://api.github.com/repos/jsdoc3/jsdoc/pulls/960/comments","review_comment_url":"https://api.github.com/repos/jsdoc3/jsdoc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jsdoc3/jsdoc/issues/960/comments","statuses_url":"https://api.github.com/repos/jsdoc3/jsdoc/statuses/705f8cf3f0b4bc20519ca2975565968f2e3fc7da","head":{"label":"theasta:812-decoupled-logger","ref":"812-decoupled-logger","sha":"705f8cf3f0b4bc20519ca2975565968f2e3fc7da","user":{"login":"theasta","id":92213,"avatar_url":"https://avatars.githubusercontent.com/u/92213?v=3","gravatar_id":"","url":"https://api.github.com/users/theasta","html_url":"https://github.com/theasta","followers_url":"https://api.github.com/users/theasta/followers","following_url":"https://api.github.com/users/theasta/following{/other_user}","gists_url":"https://api.github.com/users/theasta/gists{/gist_id}","starred_url":"https://api.github.com/users/theasta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theasta/subscriptions","organizations_url":"https://api.github.com/users/theasta/orgs","repos_url":"https://api.github.com/users/theasta/repos","events_url":"https://api.github.com/users/theasta/events{/privacy}","received_events_url":"https://api.github.com/users/theasta/received_events","type":"User","site_admin":false},"repo":{"id":26494538,"name":"jsdoc","full_name":"theasta/jsdoc","owner":{"login":"theasta","id":92213,"avatar_url":"https://avatars.githubusercontent.com/u/92213?v=3","gravatar_id":"","url":"https://api.github.com/users/theasta","html_url":"https://github.com/theasta","followers_url":"https://api.github.com/users/theasta/followers","following_url":"https://api.github.com/users/theasta/following{/other_user}","gists_url":"https://api.github.com/users/theasta/gists{/gist_id}","starred_url":"https://api.github.com/users/theasta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theasta/subscriptions","organizations_url":"https://api.github.com/users/theasta/orgs","repos_url":"https://api.github.com/users/theasta/repos","events_url":"https://api.github.com/users/theasta/events{/privacy}","received_events_url":"https://api.github.com/users/theasta/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/theasta/jsdoc","description":"An API documentation generator for JavaScript.","fork":true,"url":"https://api.github.com/repos/theasta/jsdoc","forks_url":"https://api.github.com/repos/theasta/jsdoc/forks","keys_url":"https://api.github.com/repos/theasta/jsdoc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/theasta/jsdoc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/theasta/jsdoc/teams","hooks_url":"https://api.github.com/repos/theasta/jsdoc/hooks","issue_events_url":"https://api.github.com/repos/theasta/jsdoc/issues/events{/number}","events_url":"https://api.github.com/repos/theasta/jsdoc/events","assignees_url":"https://api.github.com/repos/theasta/jsdoc/assignees{/user}","branches_url":"https://api.github.com/repos/theasta/jsdoc/branches{/branch}","tags_url":"https://api.github.com/repos/theasta/jsdoc/tags","blobs_url":"https://api.github.com/repos/theasta/jsdoc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/theasta/jsdoc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/theasta/jsdoc/git/refs{/sha}","trees_url":"https://api.github.com/repos/theasta/jsdoc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/theasta/jsdoc/statuses/{sha}","languages_url":"https://api.github.com/repos/theasta/jsdoc/languages","stargazers_url":"https://api.github.com/repos/theasta/jsdoc/stargazers","contributors_url":"https://api.github.com/repos/theasta/jsdoc/contributors","subscribers_url":"https://api.github.com/repos/theasta/jsdoc/subscribers","subscription_url":"https://api.github.com/repos/theasta/jsdoc/subscription","commits_url":"https://api.github.com/repos/theasta/jsdoc/commits{/sha}","git_commits_url":"https://api.github.com/repos/theasta/jsdoc/git/commits{/sha}","comments_url":"https://api.github.com/repos/theasta/jsdoc/comments{/number}","issue_comment_url":"https://api.github.com/repos/theasta/jsdoc/issues/comments{/number}","contents_url":"https://api.github.com/repos/theasta/jsdoc/contents/{+path}","compare_url":"https://api.github.com/repos/theasta/jsdoc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/theasta/jsdoc/merges","archive_url":"https://api.github.com/repos/theasta/jsdoc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/theasta/jsdoc/downloads","issues_url":"https://api.github.com/repos/theasta/jsdoc/issues{/number}","pulls_url":"https://api.github.com/repos/theasta/jsdoc/pulls{/number}","milestones_url":"https://api.github.com/repos/theasta/jsdoc/milestones{/number}","notifications_url":"https://api.github.com/repos/theasta/jsdoc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/theasta/jsdoc/labels{/name}","releases_url":"https://api.github.com/repos/theasta/jsdoc/releases{/id}","created_at":"2014-11-11T16:52:04Z","updated_at":"2015-03-19T06:02:47Z","pushed_at":"2015-03-24T03:16:11Z","git_url":"git://github.com/theasta/jsdoc.git","ssh_url":"git@github.com:theasta/jsdoc.git","clone_url":"https://github.com/theasta/jsdoc.git","svn_url":"https://github.com/theasta/jsdoc","homepage":"http://usejsdoc.org","size":16439,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jsdoc3:master","ref":"master","sha":"da14fedb6976b1f963020f36eb6be5157c72dd12","user":{"login":"jsdoc3","id":1530630,"avatar_url":"https://avatars.githubusercontent.com/u/1530630?v=3","gravatar_id":"","url":"https://api.github.com/users/jsdoc3","html_url":"https://github.com/jsdoc3","followers_url":"https://api.github.com/users/jsdoc3/followers","following_url":"https://api.github.com/users/jsdoc3/following{/other_user}","gists_url":"https://api.github.com/users/jsdoc3/gists{/gist_id}","starred_url":"https://api.github.com/users/jsdoc3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsdoc3/subscriptions","organizations_url":"https://api.github.com/users/jsdoc3/orgs","repos_url":"https://api.github.com/users/jsdoc3/repos","events_url":"https://api.github.com/users/jsdoc3/events{/privacy}","received_events_url":"https://api.github.com/users/jsdoc3/received_events","type":"Organization","site_admin":false},"repo":{"id":560495,"name":"jsdoc","full_name":"jsdoc3/jsdoc","owner":{"login":"jsdoc3","id":1530630,"avatar_url":"https://avatars.githubusercontent.com/u/1530630?v=3","gravatar_id":"","url":"https://api.github.com/users/jsdoc3","html_url":"https://github.com/jsdoc3","followers_url":"https://api.github.com/users/jsdoc3/followers","following_url":"https://api.github.com/users/jsdoc3/following{/other_user}","gists_url":"https://api.github.com/users/jsdoc3/gists{/gist_id}","starred_url":"https://api.github.com/users/jsdoc3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsdoc3/subscriptions","organizations_url":"https://api.github.com/users/jsdoc3/orgs","repos_url":"https://api.github.com/users/jsdoc3/repos","events_url":"https://api.github.com/users/jsdoc3/events{/privacy}","received_events_url":"https://api.github.com/users/jsdoc3/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jsdoc3/jsdoc","description":"An API documentation generator for JavaScript.","fork":false,"url":"https://api.github.com/repos/jsdoc3/jsdoc","forks_url":"https://api.github.com/repos/jsdoc3/jsdoc/forks","keys_url":"https://api.github.com/repos/jsdoc3/jsdoc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jsdoc3/jsdoc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jsdoc3/jsdoc/teams","hooks_url":"https://api.github.com/repos/jsdoc3/jsdoc/hooks","issue_events_url":"https://api.github.com/repos/jsdoc3/jsdoc/issues/events{/number}","events_url":"https://api.github.com/repos/jsdoc3/jsdoc/events","assignees_url":"https://api.github.com/repos/jsdoc3/jsdoc/assignees{/user}","branches_url":"https://api.github.com/repos/jsdoc3/jsdoc/branches{/branch}","tags_url":"https://api.github.com/repos/jsdoc3/jsdoc/tags","blobs_url":"https://api.github.com/repos/jsdoc3/jsdoc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jsdoc3/jsdoc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jsdoc3/jsdoc/git/refs{/sha}","trees_url":"https://api.github.com/repos/jsdoc3/jsdoc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jsdoc3/jsdoc/statuses/{sha}","languages_url":"https://api.github.com/repos/jsdoc3/jsdoc/languages","stargazers_url":"https://api.github.com/repos/jsdoc3/jsdoc/stargazers","contributors_url":"https://api.github.com/repos/jsdoc3/jsdoc/contributors","subscribers_url":"https://api.github.com/repos/jsdoc3/jsdoc/subscribers","subscription_url":"https://api.github.com/repos/jsdoc3/jsdoc/subscription","commits_url":"https://api.github.com/repos/jsdoc3/jsdoc/commits{/sha}","git_commits_url":"https://api.github.com/repos/jsdoc3/jsdoc/git/commits{/sha}","comments_url":"https://api.github.com/repos/jsdoc3/jsdoc/comments{/number}","issue_comment_url":"https://api.github.com/repos/jsdoc3/jsdoc/issues/comments{/number}","contents_url":"https://api.github.com/repos/jsdoc3/jsdoc/contents/{+path}","compare_url":"https://api.github.com/repos/jsdoc3/jsdoc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jsdoc3/jsdoc/merges","archive_url":"https://api.github.com/repos/jsdoc3/jsdoc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jsdoc3/jsdoc/downloads","issues_url":"https://api.github.com/repos/jsdoc3/jsdoc/issues{/number}","pulls_url":"https://api.github.com/repos/jsdoc3/jsdoc/pulls{/number}","milestones_url":"https://api.github.com/repos/jsdoc3/jsdoc/milestones{/number}","notifications_url":"https://api.github.com/repos/jsdoc3/jsdoc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jsdoc3/jsdoc/labels{/name}","releases_url":"https://api.github.com/repos/jsdoc3/jsdoc/releases{/id}","created_at":"2010-03-13T09:18:03Z","updated_at":"2015-03-31T02:03:58Z","pushed_at":"2015-03-30T23:26:12Z","git_url":"git://github.com/jsdoc3/jsdoc.git","ssh_url":"git@github.com:jsdoc3/jsdoc.git","clone_url":"https://github.com/jsdoc3/jsdoc.git","svn_url":"https://github.com/jsdoc3/jsdoc","homepage":"http://usejsdoc.org","size":21961,"stargazers_count":2928,"watchers_count":2928,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":459,"mirror_url":null,"open_issues_count":91,"forks":459,"open_issues":91,"watchers":2928,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jsdoc3/jsdoc/pulls/960"},"html":{"href":"https://github.com/jsdoc3/jsdoc/pull/960"},"issue":{"href":"https://api.github.com/repos/jsdoc3/jsdoc/issues/960"},"comments":{"href":"https://api.github.com/repos/jsdoc3/jsdoc/issues/960/comments"},"review_comments":{"href":"https://api.github.com/repos/jsdoc3/jsdoc/pulls/960/comments"},"review_comment":{"href":"https://api.github.com/repos/jsdoc3/jsdoc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jsdoc3/jsdoc/pulls/960/commits"},"statuses":{"href":"https://api.github.com/repos/jsdoc3/jsdoc/statuses/705f8cf3f0b4bc20519ca2975565968f2e3fc7da"}}}}