I find it quite hard to read (as in, visually parse) log-files where the events span more than one line (because, for example, they include a stacktrace or a multi-line message).
It would be great if there were an option to strip newlines from layout-renderers and instead render them as either nothing or some other character.
Moved from http://nlog.codeplex.com/workitem/6531
Comments:
It is very simple to implement as a wrapper layout renderer, possibly decorated with AmbientPropertyAttribute. See https://github.com/jkowalski/NLog/blob/master/src/NLog/LayoutRenderers/Wrappers/TrimWhiteSpaceLayoutRendererWrapper.cs for an example.
Moved from http://nlog.codeplex.com/workitem/6531
Comments:
It is very simple to implement as a wrapper layout renderer, possibly decorated with AmbientPropertyAttribute. See https://github.com/jkowalski/NLog/blob/master/src/NLog/LayoutRenderers/Wrappers/TrimWhiteSpaceLayoutRendererWrapper.cs for an example.