Menu ▾ ▴

#315 Replace characters in log message

future
open
None
5
2015-02-10
2014-11-03
No

It would be nice to have an option to replace characters within the logging message with another character.

A good use case for this would be to replace newlines with some other character, so that every line of the log file contains one logging message. This is of particular importance when using a RollingFileAppender with multiple processes on the same file. Then log lines can get intermixed, which makes the log practically unusable.

Discussion

  • Václav Haisman

    Václav Haisman - 2014-11-03

    I am not sure that I understand the problem you are describing. The pattern layout has the %n format specifier which inserts the system specific EOL.

     
  • Václav Haisman

    Václav Haisman - 2014-11-03
    • assigned_to: Václav Zeman