{"action":"created","issue":{"url":"https://api.github.com/repos/chalk/chalk/issues/179","repository_url":"https://api.github.com/repos/chalk/chalk","labels_url":"https://api.github.com/repos/chalk/chalk/issues/179/labels{/name}","comments_url":"https://api.github.com/repos/chalk/chalk/issues/179/comments","events_url":"https://api.github.com/repos/chalk/chalk/issues/179/events","html_url":"https://github.com/chalk/chalk/issues/179","id":244468728,"number":179,"title":"Strange characters in file transport","user":{"login":"dland512","id":1686534,"avatar_url":"https://avatars2.githubusercontent.com/u/1686534?v=4","gravatar_id":"","url":"https://api.github.com/users/dland512","html_url":"https://github.com/dland512","followers_url":"https://api.github.com/users/dland512/followers","following_url":"https://api.github.com/users/dland512/following{/other_user}","gists_url":"https://api.github.com/users/dland512/gists{/gist_id}","starred_url":"https://api.github.com/users/dland512/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dland512/subscriptions","organizations_url":"https://api.github.com/users/dland512/orgs","repos_url":"https://api.github.com/users/dland512/repos","events_url":"https://api.github.com/users/dland512/events{/privacy}","received_events_url":"https://api.github.com/users/dland512/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-07-20T19:16:18Z","updated_at":"2017-07-20T21:31:14Z","closed_at":null,"body":"I'm using chalk with [electron-log](https://github.com/megahertz/electron-log) and it works really well in the terminal window. Super cool.\r\n\r\nThe problem is that I also have my logs going out to a file and in that case I'm seeing weird characters apparently related to the colors.\r\n\r\n```\r\nvar chalk = require('chalk');\r\nvar log = require('electron-log');\r\nlog.error('logging without chalk');\r\nlog.error(chalk.red('logging with chalk'));\r\n```\r\n\r\n> [2017-07-20 14:14:23:0186] [error] logging without chalk\r\n> [2017-07-20 14:14:23:0189] [error] \u001B[31mlogging with chalk\u001B[39m\r\n\r\nIs this just a limitation of the system?"},"comment":{"url":"https://api.github.com/repos/chalk/chalk/issues/comments/316835941","html_url":"https://github.com/chalk/chalk/issues/179#issuecomment-316835941","issue_url":"https://api.github.com/repos/chalk/chalk/issues/179","id":316835941,"user":{"login":"sindresorhus","id":170270,"avatar_url":"https://avatars1.githubusercontent.com/u/170270?v=4","gravatar_id":"","url":"https://api.github.com/users/sindresorhus","html_url":"https://github.com/sindresorhus","followers_url":"https://api.github.com/users/sindresorhus/followers","following_url":"https://api.github.com/users/sindresorhus/following{/other_user}","gists_url":"https://api.github.com/users/sindresorhus/gists{/gist_id}","starred_url":"https://api.github.com/users/sindresorhus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sindresorhus/subscriptions","organizations_url":"https://api.github.com/users/sindresorhus/orgs","repos_url":"https://api.github.com/users/sindresorhus/repos","events_url":"https://api.github.com/users/sindresorhus/events{/privacy}","received_events_url":"https://api.github.com/users/sindresorhus/received_events","type":"User","site_admin":false},"created_at":"2017-07-20T21:31:14Z","updated_at":"2017-07-20T21:31:14Z","body":"Chalk is IMHO doing the correct thing here. It can't possibly know that you're also going to save the output to a file. It's up to `electron-log` to remove ansi escape codes (the `�[31m`). Open an issue on `electron-log`. It could use [`strip-ansi`](https://github.com/chalk/strip-ansi)."}}
{"actor":{"display_login":"sindresorhus"}}