{"action":"created","issue":{"url":"https://api.github.com/repos/structured-log/structured-log/issues/47","repository_url":"https://api.github.com/repos/structured-log/structured-log","labels_url":"https://api.github.com/repos/structured-log/structured-log/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/structured-log/structured-log/issues/47/comments","events_url":"https://api.github.com/repos/structured-log/structured-log/issues/47/events","html_url":"https://github.com/structured-log/structured-log/issues/47","id":260688824,"number":47,"title":"Verbose and Debug levels don't work for ConsoleSink in Node.js","user":{"login":"charandas","id":542168,"avatar_url":"https://avatars2.githubusercontent.com/u/542168?v=4","gravatar_id":"","url":"https://api.github.com/users/charandas","html_url":"https://github.com/charandas","followers_url":"https://api.github.com/users/charandas/followers","following_url":"https://api.github.com/users/charandas/following{/other_user}","gists_url":"https://api.github.com/users/charandas/gists{/gist_id}","starred_url":"https://api.github.com/users/charandas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charandas/subscriptions","organizations_url":"https://api.github.com/users/charandas/orgs","repos_url":"https://api.github.com/users/charandas/repos","events_url":"https://api.github.com/users/charandas/events{/privacy}","received_events_url":"https://api.github.com/users/charandas/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-09-26T16:29:17Z","updated_at":"2017-09-26T21:34:26Z","closed_at":"2017-09-26T18:42:27Z","author_association":"NONE","body":"After spending this morning, chasing down the code of this module, I was finally able to determine why `verbose` wasn't working, but `info` was, despite setting the `minLevel` correctly.\r\n\r\n```\r\nthis.console = {\r\n      error: (internalConsole && (internalConsole.error || internalConsole.log)) || stub,\r\n      warn:  (internalConsole && (internalConsole.warn || internalConsole.log)) || stub,\r\n      info:  (internalConsole && (internalConsole.info || internalConsole.log)) || stub,\r\n      debug: (internalConsole && (internalConsole.debug || internalConsole.log)) || stub,\r\n      log:   (internalConsole && internalConsole.log) || stub\r\n    };\r\n```\r\n\r\nwhere `internalConsole` defaults to `console`. I am using this with nodejs.  The reason for that per this [MDN page](https://developer.mozilla.org/en-US/docs/Web/API/Console) is:\r\n\r\n>Console.debug(): An alias for log() - starting with Chromium 58 this method is a no-op on Chromium browsers.\r\n\r\nCould we set working defaults, so newcomers who may not care to setup ConsoleSink options at first are not discouraged from it not working?\r\n\r\nMaybe something like:\r\n```\r\nconstructor(options?: ConsoleSinkOptions) {\r\n    this.options = options || {};\r\n    const internalConsole = this.options.console || typeof console !== 'undefined' && console || null;\r\n    const stub = function () { };\r\n    this.console = {\r\n      error: (internalConsole && (internalConsole.error || internalConsole.log)) || stub,\r\n      warn:  (internalConsole && (internalConsole.warn || internalConsole.log)) || stub,\r\n      info:  (internalConsole && (internalConsole.info || internalConsole.log)) || stub,\r\n      debug: (internalConsole && (internalConsole === console ? internalConsole.log : internalConsole.debug)) || stub,\r\n      log:   (internalConsole && internalConsole.log) || stub\r\n    };\r\n  }\r\n```\r\n  "},"comment":{"url":"https://api.github.com/repos/structured-log/structured-log/issues/comments/332343069","html_url":"https://github.com/structured-log/structured-log/issues/47#issuecomment-332343069","issue_url":"https://api.github.com/repos/structured-log/structured-log/issues/47","id":332343069,"user":{"login":"charandas","id":542168,"avatar_url":"https://avatars2.githubusercontent.com/u/542168?v=4","gravatar_id":"","url":"https://api.github.com/users/charandas","html_url":"https://github.com/charandas","followers_url":"https://api.github.com/users/charandas/followers","following_url":"https://api.github.com/users/charandas/following{/other_user}","gists_url":"https://api.github.com/users/charandas/gists{/gist_id}","starred_url":"https://api.github.com/users/charandas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charandas/subscriptions","organizations_url":"https://api.github.com/users/charandas/orgs","repos_url":"https://api.github.com/users/charandas/repos","events_url":"https://api.github.com/users/charandas/events{/privacy}","received_events_url":"https://api.github.com/users/charandas/received_events","type":"User","site_admin":false},"created_at":"2017-09-26T21:34:26Z","updated_at":"2017-09-26T21:34:26Z","author_association":"NONE","body":"@Wedvich the npm publish wasn't done for this release?\r\n\r\n```\r\nnpm ERR! notarget No matching version found for structured-log@^0.2.0\r\nnpm ERR! notarget In most cases you or one of your dependencies are requesting\r\nnpm ERR! notarget a package version that doesn't exist.\r\n```"}}
{"actor":{"display_login":"charandas"}}