{"action":"opened","issue":{"url":"https://api.github.com/repos/Rcomian/bunyan-rotating-file-stream/issues/8","repository_url":"https://api.github.com/repos/Rcomian/bunyan-rotating-file-stream","labels_url":"https://api.github.com/repos/Rcomian/bunyan-rotating-file-stream/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/Rcomian/bunyan-rotating-file-stream/issues/8/comments","events_url":"https://api.github.com/repos/Rcomian/bunyan-rotating-file-stream/issues/8/events","html_url":"https://github.com/Rcomian/bunyan-rotating-file-stream/issues/8","id":170224633,"number":8,"title":"Error: Cannot assign to read only property 'path' when Options read from JSON file","user":{"login":"vishalgakhare","id":10359853,"avatar_url":"https://avatars.githubusercontent.com/u/10359853?v=3","gravatar_id":"","url":"https://api.github.com/users/vishalgakhare","html_url":"https://github.com/vishalgakhare","followers_url":"https://api.github.com/users/vishalgakhare/followers","following_url":"https://api.github.com/users/vishalgakhare/following{/other_user}","gists_url":"https://api.github.com/users/vishalgakhare/gists{/gist_id}","starred_url":"https://api.github.com/users/vishalgakhare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vishalgakhare/subscriptions","organizations_url":"https://api.github.com/users/vishalgakhare/orgs","repos_url":"https://api.github.com/users/vishalgakhare/repos","events_url":"https://api.github.com/users/vishalgakhare/events{/privacy}","received_events_url":"https://api.github.com/users/vishalgakhare/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-09T17:29:44Z","updated_at":"2016-08-09T17:29:44Z","closed_at":null,"body":"**I have the JSON file configuration:**\r\n\"logging\": {\r\n    \"infoLogStream\": {\r\n      \"path\": \"./logs/Info.%m%d_%H%M_%N.log\",\r\n      \"period\": \"1h\",\r\n      \"totalFiles\":720,\r\n      \"threshold\": \"5m\",\r\n      \"level\":\"info\"\r\n    }\r\n  }\r\n\r\n**I create the Bunyan Logger and add bunyan-rotating-file-stream:**\r\nthis.log = bunyan.createLogger({\r\n        \"name\": serviceName\r\n        });\r\n\r\n      this.log.addStream({\r\n        stream: new RotatingFileStream(config.get(\"logging.infoLogStream\"))\r\n      });\r\n\r\n**When I start the NodeJS Server, I get the error:**\r\n/BizEvents/node_modules/bunyan-rotating-file-stream/index.js:19\r\n    options.path = path.resolve(options.path);\r\n                 ^\r\n\r\n**_TypeError: Cannot assign to read only property 'path' of #<Object>_**\r\n\r\n    at new RotatingFileStreamFactory (/Users/jsh371/Repos/BizEvents/node_modules/bunyan-rotating-file-stream/index.js:19:18)\r\n    at Object.init (/Users/jsh371/Repos/BizEvents/app/logger.js:52:17)\r\n    at Object.<anonymous> (/Users/jsh371/Repos/BizEvents/app.js:12:8)\r\n    at Module._compile (module.js:410:26)\r\n    at Object.Module._extensions..js (module.js:417:10)\r\n    at Module.load (module.js:344:32)\r\n    at Function.Module._load (module.js:301:12)\r\n    at Function.Module.runMain (module.js:442:10)\r\n    at startup (node.js:136:18)\r\n    at node.js:966:3\r\n\r\nIt works fine when I comment the error line."}}
{"actor":{"display_login":"vishalgakhare"}}