{"action":"created","issue":{"url":"https://api.github.com/repos/winstonjs/winston/issues/1217","repository_url":"https://api.github.com/repos/winstonjs/winston","labels_url":"https://api.github.com/repos/winstonjs/winston/issues/1217/labels{/name}","comments_url":"https://api.github.com/repos/winstonjs/winston/issues/1217/comments","events_url":"https://api.github.com/repos/winstonjs/winston/issues/1217/events","html_url":"https://github.com/winstonjs/winston/issues/1217","id":299375528,"number":1217,"title":"In 3.0.0 I cannot log objects without using JSON.stringify","user":{"login":"eyp","id":1089286,"avatar_url":"https://avatars0.githubusercontent.com/u/1089286?v=4","gravatar_id":"","url":"https://api.github.com/users/eyp","html_url":"https://github.com/eyp","followers_url":"https://api.github.com/users/eyp/followers","following_url":"https://api.github.com/users/eyp/following{/other_user}","gists_url":"https://api.github.com/users/eyp/gists{/gist_id}","starred_url":"https://api.github.com/users/eyp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eyp/subscriptions","organizations_url":"https://api.github.com/users/eyp/orgs","repos_url":"https://api.github.com/users/eyp/repos","events_url":"https://api.github.com/users/eyp/events{/privacy}","received_events_url":"https://api.github.com/users/eyp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-22T14:32:45Z","updated_at":"2018-02-28T22:23:07Z","closed_at":null,"author_association":"NONE","body":"I'm on version 3, but since I've upgraded the only way to log objects is by stringify first the object. \r\nBut with errors is even worse because I cannot log the error at all, I need to use error.message or directly the console.\r\n\r\nThis is my configuration for the development environment:\r\n\r\n``  const { createLogger, format, transports } = require('winston');\r\n    const { combine, timestamp, label, printf } = format;\r\n\r\n    const environment = process.env.NODE_ENV;\r\n    const timestampFormat = 'YYYY-MM-DD HH:mm:SS';\r\n\r\n    const loggerFormat = printf((info) => {\r\n        return `[${info.label}] ${info.message}`;\r\n    });\r\n    logger = createLogger({\r\n        format: combine(\r\n            label({ label: 'immoliste' }),\r\n            format.colorize({ all: true }),\r\n            format.splat(),\r\n            format.simple(),\r\n            loggerFormat\r\n        ),\r\n        transports: [\r\n            new transports.Console({\r\n                level: 'debug',\r\n                colorized: true\r\n            })\r\n        ]\r\n    });\r\n\r\nDoing this:\r\n\r\n\r\n`logger.error('Error sending contact message:', JSON.stringify(err));` \r\n\r\nI got only:\r\n\r\n`[mylabel] Error sending contact message:`\r\n\r\nBut is a pain in the ass having to stringify everything, and doind that for errors. What am I doing wrong?, because in previous versions it was straightforward.\r\n"},"comment":{"url":"https://api.github.com/repos/winstonjs/winston/issues/comments/369404353","html_url":"https://github.com/winstonjs/winston/issues/1217#issuecomment-369404353","issue_url":"https://api.github.com/repos/winstonjs/winston/issues/1217","id":369404353,"user":{"login":"gravitycode","id":8099955,"avatar_url":"https://avatars2.githubusercontent.com/u/8099955?v=4","gravatar_id":"","url":"https://api.github.com/users/gravitycode","html_url":"https://github.com/gravitycode","followers_url":"https://api.github.com/users/gravitycode/followers","following_url":"https://api.github.com/users/gravitycode/following{/other_user}","gists_url":"https://api.github.com/users/gravitycode/gists{/gist_id}","starred_url":"https://api.github.com/users/gravitycode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gravitycode/subscriptions","organizations_url":"https://api.github.com/users/gravitycode/orgs","repos_url":"https://api.github.com/users/gravitycode/repos","events_url":"https://api.github.com/users/gravitycode/events{/privacy}","received_events_url":"https://api.github.com/users/gravitycode/received_events","type":"User","site_admin":false},"created_at":"2018-02-28T22:23:07Z","updated_at":"2018-02-28T22:23:07Z","author_association":"NONE","body":"+1"}}
{"actor":{"display_login":"gravitycode"}}