{"action":"closed","issue":{"url":"https://api.github.com/repos/mozilla/chronicle/issues/103","labels_url":"https://api.github.com/repos/mozilla/chronicle/issues/103/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/chronicle/issues/103/comments","events_url":"https://api.github.com/repos/mozilla/chronicle/issues/103/events","html_url":"https://github.com/mozilla/chronicle/issues/103","id":54123165,"number":103,"title":"verbose logging dumps out function declarations","user":{"login":"pdehaan","id":557895,"avatar_url":"https://avatars.githubusercontent.com/u/557895?v=3","gravatar_id":"","url":"https://api.github.com/users/pdehaan","html_url":"https://github.com/pdehaan","followers_url":"https://api.github.com/users/pdehaan/followers","following_url":"https://api.github.com/users/pdehaan/following{/other_user}","gists_url":"https://api.github.com/users/pdehaan/gists{/gist_id}","starred_url":"https://api.github.com/users/pdehaan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdehaan/subscriptions","organizations_url":"https://api.github.com/users/pdehaan/orgs","repos_url":"https://api.github.com/users/pdehaan/repos","events_url":"https://api.github.com/users/pdehaan/events{/privacy}","received_events_url":"https://api.github.com/users/pdehaan/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mozilla/chronicle/labels/server","name":"server","color":"207de5"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/mozilla/chronicle/milestones/6","labels_url":"https://api.github.com/repos/mozilla/chronicle/milestones/6/labels","id":922650,"number":6,"title":"Sprint 4","description":"Search visits and make them look awesome.","creator":{"login":"nchapman","id":3095,"avatar_url":"https://avatars.githubusercontent.com/u/3095?v=3","gravatar_id":"","url":"https://api.github.com/users/nchapman","html_url":"https://github.com/nchapman","followers_url":"https://api.github.com/users/nchapman/followers","following_url":"https://api.github.com/users/nchapman/following{/other_user}","gists_url":"https://api.github.com/users/nchapman/gists{/gist_id}","starred_url":"https://api.github.com/users/nchapman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nchapman/subscriptions","organizations_url":"https://api.github.com/users/nchapman/orgs","repos_url":"https://api.github.com/users/nchapman/repos","events_url":"https://api.github.com/users/nchapman/events{/privacy}","received_events_url":"https://api.github.com/users/nchapman/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":2,"state":"open","created_at":"2015-01-05T19:17:28Z","updated_at":"2015-01-15T23:19:23Z","due_on":"2015-01-30T08:00:00Z","closed_at":null},"comments":5,"created_at":"2015-01-12T23:34:19Z","updated_at":"2015-01-15T23:19:23Z","closed_at":"2015-01-15T23:19:23Z","body":"When running the server, `npm start`, I'm seeing some pretty funky function declarations in the output. Not sure if this could mess up Heka logging or anything downstream...\r\n\r\n```\r\nchronicle.server.db.db.VERBOSE: db.getUserById called. arguments are: a6c9411418f94710a712ab97e7a3541c, function (err, result) {\r\n        log.verbose('does user exist? result is ' + JSON.stringify(result));\r\n        if (err) {\r\n          return cb(err, false);\r\n        }\r\n        cb(null, !!result, fxaId);\r\n      }\r\nchronicle.server.index.VERBOSE: does user exist? result is {\"fxaId\":\"a6c9411418f94710a712ab97e7a3541c\",\"email\":\"fake_user@example.com\",\"oauthToken\":\"fakeOauthToken\"}\r\nchronicle.server.db.db.VERBOSE: db.updateVisit called. arguments are: a6c9411418f94710a712ab97e7a3541c, 8c5dbe7e-e650-47e9-a6e8-ed810381d9ad, function (err) {\r\n        if (err) {\r\n          log.warn(err);\r\n          return reply(Boom.create(500));\r\n        }\r\n        reply();\r\n      }\r\n```\r\n\r\nIf I'm chasing the code correctly, it's coming from the `verbose()` method in [/server/db/db.js:17-20](https://github.com/mozilla/chronicle/blob/586c5f29979590d8e8ecb463d253edca57587cbf/server/db/db.js#L17-L20):\r\n\r\n```js\r\nfunction _verbose(funcName, funcArgs) {\r\n  var args = funcArgs && [].join.call(funcArgs, ', ');\r\n  log.verbose(funcName + ' called. arguments are: ' + args);\r\n}\r\n```\r\n\r\nNot sure if we should try filtering the arguments and remove any functions or see if we can call `JSON.stringify(args)` (although that may convert functions into `null` which may be misleading/confusing)."}}