Is it possible to log to file using SLF4j without line feeds?
Basically, I have a waitTimer() method that prints a "." once per second and I want all the dots to appear on one line in the log file.
From this, if you have %n in your log4j layout, line separator such as "\n" will be appended at each message automatically. Remove it will make all messages appear in one line. But if you also want to keep other message with line feeds, you'd better define two appender.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With