{"action":"opened","issue":{"url":"https://api.github.com/repos/DHGMS-Solutions/nlogtargetstextwriter/issues/2","repository_url":"https://api.github.com/repos/DHGMS-Solutions/nlogtargetstextwriter","labels_url":"https://api.github.com/repos/DHGMS-Solutions/nlogtargetstextwriter/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/DHGMS-Solutions/nlogtargetstextwriter/issues/2/comments","events_url":"https://api.github.com/repos/DHGMS-Solutions/nlogtargetstextwriter/issues/2/events","html_url":"https://github.com/DHGMS-Solutions/nlogtargetstextwriter/issues/2","id":377194631,"node_id":"MDU6SXNzdWUzNzcxOTQ2MzE=","number":2,"title":"Target.RenderLogEvent with better performance","user":{"login":"snakefoot","id":11509660,"node_id":"MDQ6VXNlcjExNTA5NjYw","avatar_url":"https://avatars3.githubusercontent.com/u/11509660?v=4","gravatar_id":"","url":"https://api.github.com/users/snakefoot","html_url":"https://github.com/snakefoot","followers_url":"https://api.github.com/users/snakefoot/followers","following_url":"https://api.github.com/users/snakefoot/following{/other_user}","gists_url":"https://api.github.com/users/snakefoot/gists{/gist_id}","starred_url":"https://api.github.com/users/snakefoot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snakefoot/subscriptions","organizations_url":"https://api.github.com/users/snakefoot/orgs","repos_url":"https://api.github.com/users/snakefoot/repos","events_url":"https://api.github.com/users/snakefoot/events{/privacy}","received_events_url":"https://api.github.com/users/snakefoot/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-04T21:04:57Z","updated_at":"2018-11-04T21:04:57Z","closed_at":null,"author_association":"NONE","body":"Instead of doing this:\r\n\r\nhttps://github.com/DHGMS-Solutions/nlogtargetstextwriter/blob/f8702ac0ec1342edadf60e1ee02d7e506d855123/src/NLog.Targets.TextWriter/TextWriterTarget.cs#L33\r\n\r\nThen you can do this:\r\n\r\n```c#\r\npublic TextWriterTarget(TextWriter textWriter)\r\n{\r\n    this._textWriter = textWriter;\r\n    this.OptimizeBufferReuse = true;\r\n}\r\n\r\nprotected override void Write(LogEventInfo logEvent)\r\n{\r\n    var logMessage = this.RenderLogEvent(logEvent, Layout);\r\n    this._textWriter.Write(logMessage);\r\n}\r\n```"}}
{"actor":{"display_login":"snakefoot"}}