{"action":"created","issue":{"url":"https://api.github.com/repos/pinojs/pino/issues/386","repository_url":"https://api.github.com/repos/pinojs/pino","labels_url":"https://api.github.com/repos/pinojs/pino/issues/386/labels{/name}","comments_url":"https://api.github.com/repos/pinojs/pino/issues/386/comments","events_url":"https://api.github.com/repos/pinojs/pino/issues/386/events","html_url":"https://github.com/pinojs/pino/pull/386","id":311440477,"number":386,"title":"CLI revamp","user":{"login":"jsumners","id":321201,"avatar_url":"https://avatars1.githubusercontent.com/u/321201?v=4","gravatar_id":"","url":"https://api.github.com/users/jsumners","html_url":"https://github.com/jsumners","followers_url":"https://api.github.com/users/jsumners/followers","following_url":"https://api.github.com/users/jsumners/following{/other_user}","gists_url":"https://api.github.com/users/jsumners/gists{/gist_id}","starred_url":"https://api.github.com/users/jsumners/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsumners/subscriptions","organizations_url":"https://api.github.com/users/jsumners/orgs","repos_url":"https://api.github.com/users/jsumners/repos","events_url":"https://api.github.com/users/jsumners/events{/privacy}","received_events_url":"https://api.github.com/users/jsumners/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/pinojs/pino/milestones/1","html_url":"https://github.com/pinojs/pino/milestone/1","labels_url":"https://api.github.com/repos/pinojs/pino/milestones/1/labels","id":3247708,"number":1,"title":"v5.0.0","description":null,"creator":{"login":"jsumners","id":321201,"avatar_url":"https://avatars1.githubusercontent.com/u/321201?v=4","gravatar_id":"","url":"https://api.github.com/users/jsumners","html_url":"https://github.com/jsumners","followers_url":"https://api.github.com/users/jsumners/followers","following_url":"https://api.github.com/users/jsumners/following{/other_user}","gists_url":"https://api.github.com/users/jsumners/gists{/gist_id}","starred_url":"https://api.github.com/users/jsumners/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsumners/subscriptions","organizations_url":"https://api.github.com/users/jsumners/orgs","repos_url":"https://api.github.com/users/jsumners/repos","events_url":"https://api.github.com/users/jsumners/events{/privacy}","received_events_url":"https://api.github.com/users/jsumners/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":2,"state":"open","created_at":"2018-04-06T12:28:36Z","updated_at":"2018-04-06T12:40:08Z","due_on":null,"closed_at":null},"comments":13,"created_at":"2018-04-05T01:04:29Z","updated_at":"2018-04-11T12:44:53Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/pinojs/pino/pulls/386","html_url":"https://github.com/pinojs/pino/pull/386","diff_url":"https://github.com/pinojs/pino/pull/386.diff","patch_url":"https://github.com/pinojs/pino/pull/386.patch"},"body":"Here it is: the \"revamp\" of the CLI. Or rather, the complete removal of it. Notice that the target branch of this PR is the `next-major` branch ***not*** the `master` branch.\r\n\r\nThis PR:\r\n\r\n1. Removes the CLI completely and reduces core to just a logger\r\n2. Introduces the concept of Pino prettifier modules\r\n\r\n## Prettifier Modules\r\n\r\nA prettifier module is one like [`pino-pretty`](https://github.com/pinojs/pino-pretty). Such modules export a factory function that accepts a configuration object. That function returns a formatter function that can accept an ndJSON log line or a Pino log object. That function also includes an `asMetaWrapper(destStream)` method attached to it which returns a metadata API compatible stream object. This allows for users to do:\r\n\r\n```js\r\nconst log = require('pino')({\r\n  prettyPrint: {\r\n    someFooPrettifierOption: 'and-value'\r\n  },\r\n  prettifier: 'foo-prettifier'\r\n})\r\n```\r\n\r\nThis means people like @lrlna could update their awesome modules to be used directly in-process. 🎉\r\n\r\n## Semver Major 🚨🚨🚨 😱\r\n\r\nI realize we would prefer not to issue a new major. But we have a few things queued up just waiting for us to be brave enough for a new major -- https://github.com/pinojs/pino/projects/1 . The majority of the recent issues deal with the prettifier and CLI. Those are not the problems Pino strives to solve. So by removing them from core and issuing a new major version we will be reducing Pino down to its purpose: generate logs. And I think the logger features are mature enough that v5.y.z will be with us for a *long* time: we just have to make sure the prettifier API is solid."},"comment":{"url":"https://api.github.com/repos/pinojs/pino/issues/comments/380438534","html_url":"https://github.com/pinojs/pino/pull/386#issuecomment-380438534","issue_url":"https://api.github.com/repos/pinojs/pino/issues/386","id":380438534,"user":{"login":"jsumners","id":321201,"avatar_url":"https://avatars1.githubusercontent.com/u/321201?v=4","gravatar_id":"","url":"https://api.github.com/users/jsumners","html_url":"https://github.com/jsumners","followers_url":"https://api.github.com/users/jsumners/followers","following_url":"https://api.github.com/users/jsumners/following{/other_user}","gists_url":"https://api.github.com/users/jsumners/gists{/gist_id}","starred_url":"https://api.github.com/users/jsumners/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsumners/subscriptions","organizations_url":"https://api.github.com/users/jsumners/orgs","repos_url":"https://api.github.com/users/jsumners/repos","events_url":"https://api.github.com/users/jsumners/events{/privacy}","received_events_url":"https://api.github.com/users/jsumners/received_events","type":"User","site_admin":false},"created_at":"2018-04-11T12:44:53Z","updated_at":"2018-04-11T12:44:53Z","author_association":"COLLABORATOR","body":"The latest commit moves `asMetaWrapper` into Pino as an internal API and updates the `doc/pretty.md` accordingly. How does this look @mcollina and @davidmarkclements ?"}}
{"actor":{"display_login":"jsumners"}}