I'm using logback to log to a rolling file in my Spring Boot service. In one of my classes, I am attempting to log a really long string (a string value of a very large object array that can have tens of thousands of elements).
log.info(str);
The above does not print, probably because the value of str is a very very long string.
//logback truncates the list - to preserve this we should record it in an audit table
String rl = String.valueOf(reptIdList);
String truncRlStr = rl.substring(0, Math.min(rl.length(), 100));
log.info(truncRlStr);
The above does print. Probably because I'm truncating the very long string to 100 characters.
There is probably a limit to the length of the string in logback - is there a way to set it to maximum string length? I notice that there is no limitation on string length when logging into the console.
Thanks for any advice.