{"action":"created","issue":{"url":"https://api.github.com/repos/trentm/node-bunyan/issues/332","labels_url":"https://api.github.com/repos/trentm/node-bunyan/issues/332/labels{/name}","comments_url":"https://api.github.com/repos/trentm/node-bunyan/issues/332/comments","events_url":"https://api.github.com/repos/trentm/node-bunyan/issues/332/events","html_url":"https://github.com/trentm/node-bunyan/issues/332","id":126910378,"number":332,"title":"Setting stream to process.stdout causes TypeError: s.stream.write is not a function","user":{"login":"vrghost242","id":12150067,"avatar_url":"https://avatars.githubusercontent.com/u/12150067?v=3","gravatar_id":"","url":"https://api.github.com/users/vrghost242","html_url":"https://github.com/vrghost242","followers_url":"https://api.github.com/users/vrghost242/followers","following_url":"https://api.github.com/users/vrghost242/following{/other_user}","gists_url":"https://api.github.com/users/vrghost242/gists{/gist_id}","starred_url":"https://api.github.com/users/vrghost242/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vrghost242/subscriptions","organizations_url":"https://api.github.com/users/vrghost242/orgs","repos_url":"https://api.github.com/users/vrghost242/repos","events_url":"https://api.github.com/users/vrghost242/events{/privacy}","received_events_url":"https://api.github.com/users/vrghost242/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/trentm/node-bunyan/labels/needslabels","name":"needslabels","color":"fef2c0"},{"url":"https://api.github.com/repos/trentm/node-bunyan/labels/needstriage","name":"needstriage","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-15T16:48:46Z","updated_at":"2016-01-23T21:21:57Z","closed_at":null,"body":"So thought I would test this logger as it seems really good. \r\n\r\nThought I would create the logger with three levels to start with, so set it us as follows:\r\n``` javascript\r\nvar bunyan = require('bunyan');\r\nvar log = bunyan.createLogger({name: 'MAIN',\r\n  streams: [\r\n    {\r\n      level: 'info',\r\n      stream: 'process.stdout'\r\n    },\r\n    {\r\n      level: 'warn',\r\n      stream: 'process.stdout'\r\n    },\r\n    {\r\n      level: 'error',\r\n      path: 'process.stdout'\r\n    }\r\n]});\r\n```\r\nHowever, if I start the application with this code I get:\r\n``` javascript\r\n/Users/bengtbjorkberg/WebstormProjects/tentogive-https/node_modules/bunyan/lib/bunyan.js:875\r\n            s.stream.write(s.raw ? rec : str);\r\n                     ^\r\n\r\nTypeError: s.stream.write is not a function\r\n    at Logger._emit (/Users/bengtbjorkberg/WebstormProjects/tentogive-https/node_modules/bunyan/lib/bunyan.js:875:22)\r\n    at Logger.info (/Users/bengtbjorkberg/WebstormProjects/tentogive-https/node_modules/bunyan/lib/bunyan.js:974:24)\r\n    at Object.<anonymous> (/Users/bengtbjorkberg/WebstormProjects/tentogive-https/tentogive-https.js:27:5)\r\n    at Module._compile (module.js:435:26)\r\n    at Object.Module._extensions..js (module.js:442:10)\r\n    at Module.load (module.js:356:32)\r\n    at Function.Module._load (module.js:311:12)\r\n    at Function.Module.runMain (module.js:467:10)\r\n    at startup (node.js:136:18)\r\n    at node.js:963:3\r\n\r\nProcess finished with exit code 1\r\n```\r\n\r\nI also get a empty file called stdout.process\r\n\r\nHowever, id I remove \"streams\"\r\n``` javascript\r\nvar bunyan = require('bunyan');\r\nvar log = bunyan.createLogger({name: 'MAIN'});\r\n```\r\n\r\nI get the correct output to the terminal. \r\nNot certain if this is key, but I am on a mac OSX develolpment machine"},"comment":{"url":"https://api.github.com/repos/trentm/node-bunyan/issues/comments/174223702","html_url":"https://github.com/trentm/node-bunyan/issues/332#issuecomment-174223702","issue_url":"https://api.github.com/repos/trentm/node-bunyan/issues/332","id":174223702,"user":{"login":"trentm","id":46866,"avatar_url":"https://avatars.githubusercontent.com/u/46866?v=3","gravatar_id":"","url":"https://api.github.com/users/trentm","html_url":"https://github.com/trentm","followers_url":"https://api.github.com/users/trentm/followers","following_url":"https://api.github.com/users/trentm/following{/other_user}","gists_url":"https://api.github.com/users/trentm/gists{/gist_id}","starred_url":"https://api.github.com/users/trentm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trentm/subscriptions","organizations_url":"https://api.github.com/users/trentm/orgs","repos_url":"https://api.github.com/users/trentm/repos","events_url":"https://api.github.com/users/trentm/events{/privacy}","received_events_url":"https://api.github.com/users/trentm/received_events","type":"User","site_admin":false},"created_at":"2016-01-23T21:21:57Z","updated_at":"2016-01-23T21:21:57Z","body":"@msealand thanks for answering\r\n\r\nI think I'll leave this ticket open to have Bunyan emit a clearer warning when that stream is first added... rather than obtusely error out later when writing the first record."}}