Log4J prints an empty line in logfile

In java, you can use System.out.println () to print an empty line, but how does it work with log4j in the log file? There I also want to have one or more blank lines inside the log file.

I already read the following: log4j how to add an empty line

But this is not very useful because

logger.debug("\n");
logger.debug("");

you do not print the message, but other information, such as time, etc. (log layout) is saved in the log file. But I just want to have a complete empty string. Can anybody help me?

+5
source share
2 answers

Log4j is not intended to write blank lines.

, , - .

, FileAppender, . message.equals("\n"); , . Logger.debug("\n");

. Log-Message . , Logmessage , LogViewer, chainsaw OtrosLogViewer Stacktraces.

+8

appender , appender. , . , false, , .

+2

All Articles