How do I add a line break / blank line after my LOG statement?

Simply add \n at the end of the string to log.

LOGGER.info("Person's name is  {} .\n", person.getName());

If you are in a windows environment use \r\n


To get the right value of new line if you don’t know the end operating system of your application you can use the property line.separator

String lineSeparator = System.getProperty("line.separator");
LOGGER.info("Person's name is  {} .{}", person.getName(), lineSeparator);

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)