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.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.