{"action":"created","issue":{"url":"https://api.github.com/repos/sindresorhus/ora/issues/49","repository_url":"https://api.github.com/repos/sindresorhus/ora","labels_url":"https://api.github.com/repos/sindresorhus/ora/issues/49/labels{/name}","comments_url":"https://api.github.com/repos/sindresorhus/ora/issues/49/comments","events_url":"https://api.github.com/repos/sindresorhus/ora/issues/49/events","html_url":"https://github.com/sindresorhus/ora/issues/49","id":246864983,"number":49,"title":"Possible to use ora when logging things after the first initiation of a spinner?","user":{"login":"Aetheryx","id":25572140,"avatar_url":"https://avatars3.githubusercontent.com/u/25572140?v=4","gravatar_id":"","url":"https://api.github.com/users/Aetheryx","html_url":"https://github.com/Aetheryx","followers_url":"https://api.github.com/users/Aetheryx/followers","following_url":"https://api.github.com/users/Aetheryx/following{/other_user}","gists_url":"https://api.github.com/users/Aetheryx/gists{/gist_id}","starred_url":"https://api.github.com/users/Aetheryx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aetheryx/subscriptions","organizations_url":"https://api.github.com/users/Aetheryx/orgs","repos_url":"https://api.github.com/users/Aetheryx/repos","events_url":"https://api.github.com/users/Aetheryx/events{/privacy}","received_events_url":"https://api.github.com/users/Aetheryx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-07-31T19:53:09Z","updated_at":"2018-02-28T15:00:58Z","closed_at":null,"author_association":"NONE","body":"If I initiate a spinner, `console.log` something after initiating it, and then end the spinner, it prints on a new line. \r\nExample: \r\n```javascript\r\nconst ora = require('ora');\r\nconst spinner = ora();\r\nspinner.start('initialized spinner');\r\n\r\nconsole.log('\\nsomething else');\r\n\r\nsetTimeout(() => {\r\n    spinner.succeed('ended spinner');\r\n}, 3500);\r\n```\r\n\r\nHow it ends up: http://i.imgur.com/ok6zSKZ.png\r\nHow I want it to end up: http://i.imgur.com/aBeERi0.png"},"comment":{"url":"https://api.github.com/repos/sindresorhus/ora/issues/comments/369266313","html_url":"https://github.com/sindresorhus/ora/issues/49#issuecomment-369266313","issue_url":"https://api.github.com/repos/sindresorhus/ora/issues/49","id":369266313,"user":{"login":"rhn94","id":24575638,"avatar_url":"https://avatars1.githubusercontent.com/u/24575638?v=4","gravatar_id":"","url":"https://api.github.com/users/rhn94","html_url":"https://github.com/rhn94","followers_url":"https://api.github.com/users/rhn94/followers","following_url":"https://api.github.com/users/rhn94/following{/other_user}","gists_url":"https://api.github.com/users/rhn94/gists{/gist_id}","starred_url":"https://api.github.com/users/rhn94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhn94/subscriptions","organizations_url":"https://api.github.com/users/rhn94/orgs","repos_url":"https://api.github.com/users/rhn94/repos","events_url":"https://api.github.com/users/rhn94/events{/privacy}","received_events_url":"https://api.github.com/users/rhn94/received_events","type":"User","site_admin":false},"created_at":"2018-02-28T15:00:58Z","updated_at":"2018-02-28T15:00:58Z","author_association":"NONE","body":"well, this isn't a perfect solution, but you can use this as a starting point to build a function that could handle it better. I cooked this up in like 5 mins.\r\n\r\n```javascript\r\nlet buffer;\r\n\r\nfunction logtext(text) {\r\n    buffer = text;\r\n    spinner.text = `${spinner.text}\\n${text}`\r\n}\r\n\r\nspinner.start('initialized spinner');\r\n\r\nlogtext('something else');\r\n\r\nsetTimeout(() => {\r\n    spinner.succeed(`ended spinner\\n${buffer}`);\r\n    process.exit();\r\n}, 3500);\r\n```"}}
{"actor":{"display_login":"rhn94"}}