{"action":"opened","issue":{"url":"https://api.github.com/repos/krakenjs/beaver-logger/issues/13","repository_url":"https://api.github.com/repos/krakenjs/beaver-logger","labels_url":"https://api.github.com/repos/krakenjs/beaver-logger/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/krakenjs/beaver-logger/issues/13/comments","events_url":"https://api.github.com/repos/krakenjs/beaver-logger/issues/13/events","html_url":"https://github.com/krakenjs/beaver-logger/issues/13","id":267616246,"number":13,"title":"client .log method mutates payload","user":{"login":"tamsingreen","id":6200644,"avatar_url":"https://avatars1.githubusercontent.com/u/6200644?v=4","gravatar_id":"","url":"https://api.github.com/users/tamsingreen","html_url":"https://github.com/tamsingreen","followers_url":"https://api.github.com/users/tamsingreen/followers","following_url":"https://api.github.com/users/tamsingreen/following{/other_user}","gists_url":"https://api.github.com/users/tamsingreen/gists{/gist_id}","starred_url":"https://api.github.com/users/tamsingreen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tamsingreen/subscriptions","organizations_url":"https://api.github.com/users/tamsingreen/orgs","repos_url":"https://api.github.com/users/tamsingreen/repos","events_url":"https://api.github.com/users/tamsingreen/events{/privacy}","received_events_url":"https://api.github.com/users/tamsingreen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-10-23T10:25:44Z","updated_at":"2017-10-23T10:25:44Z","closed_at":null,"author_association":"NONE","body":"Hello, and thanks for open-sourcing this project.\r\n\r\neg here: https://github.com/krakenjs/beaver-logger/blob/master/client/logger.js#L164\r\n\r\nLet's say I have an object:\r\n```\r\nconst foo = {\r\n   hello: 'world'\r\n};\r\n```\r\nI want to a) use this object elsewhere (in my case call another method with it) and b) log it. My code is doing this:\r\n```\r\nthis.props.doSomething(foo);\r\nlogger.log('info', 'some-event', foo);\r\n```\r\ndoSomething() is making a network request and the object that is sent looks something like:\r\n```\r\n{\"pageID\": \"ee16011be5\", \"hello\": \"world\", \"timestamp\": 1508753799851, \"windowID\": \"584531ba3e\"}\r\n```\r\nAs a workaround I can use the spread operator when calling the .log method (ie `logger.log('info', 'some-event', {...foo})`) but ideally the log method would take care of this itself.\r\n\r\nI will try raise a PR to address this if it's welcome!"}}
{"actor":{"display_login":"tamsingreen"}}