{"action":"created","issue":{"url":"https://api.github.com/repos/lazywithclass/winston-cloudwatch/issues/90","repository_url":"https://api.github.com/repos/lazywithclass/winston-cloudwatch","labels_url":"https://api.github.com/repos/lazywithclass/winston-cloudwatch/issues/90/labels{/name}","comments_url":"https://api.github.com/repos/lazywithclass/winston-cloudwatch/issues/90/comments","events_url":"https://api.github.com/repos/lazywithclass/winston-cloudwatch/issues/90/events","html_url":"https://github.com/lazywithclass/winston-cloudwatch/issues/90","id":343927163,"node_id":"MDU6SXNzdWUzNDM5MjcxNjM=","number":90,"title":"messageFormatter doesn't seem to work (since Winston 3.0.0?)","user":{"login":"navFooh","id":394452,"node_id":"MDQ6VXNlcjM5NDQ1Mg==","avatar_url":"https://avatars1.githubusercontent.com/u/394452?v=4","gravatar_id":"","url":"https://api.github.com/users/navFooh","html_url":"https://github.com/navFooh","followers_url":"https://api.github.com/users/navFooh/followers","following_url":"https://api.github.com/users/navFooh/following{/other_user}","gists_url":"https://api.github.com/users/navFooh/gists{/gist_id}","starred_url":"https://api.github.com/users/navFooh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/navFooh/subscriptions","organizations_url":"https://api.github.com/users/navFooh/orgs","repos_url":"https://api.github.com/users/navFooh/repos","events_url":"https://api.github.com/users/navFooh/events{/privacy}","received_events_url":"https://api.github.com/users/navFooh/received_events","type":"User","site_admin":false},"labels":[{"id":154676587,"node_id":"MDU6TGFiZWwxNTQ2NzY1ODc=","url":"https://api.github.com/repos/lazywithclass/winston-cloudwatch/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-07-24T08:02:56Z","updated_at":"2018-09-07T10:03:52Z","closed_at":null,"author_association":"NONE","body":"Hello,\r\n\r\nRecently I upgraded to Winston 3.0.0 and decided to add some message formatting as well. I my old setup I never used the `messageFormatter` property of `winston-cloudwatch`, but now I felt a need to.\r\n\r\nHowever it seems like the `messageFormatter` function is never executed. No matter what I change on the logObject or what I return from the function. Even when I do a `console.log` in the formatter, it never shows up.\r\n\r\nI did notice that the whole formatting system of Winston changed quite a bit since 2.x. Maybe this had an impact on this formatter as well? Do you have a working example somewhere?\r\n\r\nBest, Thijs"},"comment":{"url":"https://api.github.com/repos/lazywithclass/winston-cloudwatch/issues/comments/419390350","html_url":"https://github.com/lazywithclass/winston-cloudwatch/issues/90#issuecomment-419390350","issue_url":"https://api.github.com/repos/lazywithclass/winston-cloudwatch/issues/90","id":419390350,"node_id":"MDEyOklzc3VlQ29tbWVudDQxOTM5MDM1MA==","user":{"login":"navFooh","id":394452,"node_id":"MDQ6VXNlcjM5NDQ1Mg==","avatar_url":"https://avatars1.githubusercontent.com/u/394452?v=4","gravatar_id":"","url":"https://api.github.com/users/navFooh","html_url":"https://github.com/navFooh","followers_url":"https://api.github.com/users/navFooh/followers","following_url":"https://api.github.com/users/navFooh/following{/other_user}","gists_url":"https://api.github.com/users/navFooh/gists{/gist_id}","starred_url":"https://api.github.com/users/navFooh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/navFooh/subscriptions","organizations_url":"https://api.github.com/users/navFooh/orgs","repos_url":"https://api.github.com/users/navFooh/repos","events_url":"https://api.github.com/users/navFooh/events{/privacy}","received_events_url":"https://api.github.com/users/navFooh/received_events","type":"User","site_admin":false},"created_at":"2018-09-07T10:03:52Z","updated_at":"2018-09-07T10:03:52Z","author_association":"NONE","body":"Sorry, I didn't have much time to get back to you recently.\r\n\r\nI tried your example and that works fine for me too! So I got curious and tried to find why it didn't work in my original case.\r\n\r\nFinally I discovered that when specifying the option `jsonMessage: true`, it never hits the `messageFormatter`. Maybe this is desired behaviour, since it's already being formatted as JSON. However, Winston 3 does support combining multiple formatters. Anyway, I'll leave it up to you what to do with it from here :) I don't necessarily need the messageFormatter anymore.\r\n\r\nCheers!"}}
{"actor":{"display_login":"navFooh"}}