{"action":"opened","issue":{"url":"https://api.github.com/repos/jjchiw/gelf4net/issues/36","repository_url":"https://api.github.com/repos/jjchiw/gelf4net","labels_url":"https://api.github.com/repos/jjchiw/gelf4net/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/jjchiw/gelf4net/issues/36/comments","events_url":"https://api.github.com/repos/jjchiw/gelf4net/issues/36/events","html_url":"https://github.com/jjchiw/gelf4net/issues/36","id":162860491,"number":36,"title":"Check the LoggingEvent.RenderedMessage property as well if MessageObject is null","user":{"login":"andrasnemes","id":1712518,"avatar_url":"https://avatars.githubusercontent.com/u/1712518?v=3","gravatar_id":"","url":"https://api.github.com/users/andrasnemes","html_url":"https://github.com/andrasnemes","followers_url":"https://api.github.com/users/andrasnemes/followers","following_url":"https://api.github.com/users/andrasnemes/following{/other_user}","gists_url":"https://api.github.com/users/andrasnemes/gists{/gist_id}","starred_url":"https://api.github.com/users/andrasnemes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrasnemes/subscriptions","organizations_url":"https://api.github.com/users/andrasnemes/orgs","repos_url":"https://api.github.com/users/andrasnemes/repos","events_url":"https://api.github.com/users/andrasnemes/events{/privacy}","received_events_url":"https://api.github.com/users/andrasnemes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-06-29T07:41:11Z","updated_at":"2016-06-29T07:41:11Z","closed_at":null,"body":"Hello,\r\n\r\nIn log4net a new LoggingEvent object can be constructed using the LoggingEventData struct:\r\n\r\nLoggingEventData loggingEventData = new LoggingEventData();\r\nloggingEventData.Message = \"Here is a short message\";\r\n//other properties are also set, ignored here\r\nLoggingEvent loggingEvent = new LoggingEvent(loggingEventData);\r\n\r\nStrangely enough the MessageObject property of LoggingEvent will be null, whereas the RenderedMessage property will be set to \"Here is a short message\".\r\n\r\nThen in the AddLoggingEventToMessage method of GelfLayout (https://github.com/jjchiw/gelf4net/blob/master/src/Gelf4net/Layout/GelfLayout.cs , line 144) the code only checks the MessageObject property of LoggingEvent. If that is null then we pass a null message to Graylog. \r\n\r\nI think it would make sense to check the RenderedMessage property as well. If MessageObject is null but RenderedMessage is not an empty string then gelfMessage.FullMessage should be populated with that value.\r\n\r\nThanks and best regards,\r\nAndras Nemes"}}
{"actor":{"display_login":"andrasnemes"}}