Reply – Re: Open log file (log4net) with multiline messages
Your Name
Subject
Message
or Cancel
In Reply To
Re: Open log file (log4net) with multiline messages
— by Philipp Lauchner Philipp Lauchner
Dear Anthony

unfortunatelly this is a known problem of pattern based messages. You can find a discussion of that problem in this thread:
http://forum.log4view.com/NLog-multiline-Log-Message-tp245.html

To sum up, the possible solutions are:

- Use the xml layout (highly recommended by us)

- Remove newlines in your output when logging: https://stackoverflow.com/questions/19993416/how-to-escape-newline-characters-in-the-message?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

- Add a specific identifier to the start of your pattern, e.g.: #MessageStart# %d{HH:mm:ss} %p %logger %t %m


Yours sincerely

Philipp Lauchner
PROSA GmbH  
Development & Support