Noticed strange behaviour with Logback ConsoleAppender when trying to log long messages to Windows command prompt. When using groovys own println-method no such limitation exists. I have not seen any mention of a length limitation in any documentation either.
Messages with more than 62732 characters will not print at all. The same log message is visible when logged to a file with the RollingFileAppender.
I've attached a small Groovy script that demonstrates the problem on my machine. It needs groovy to run but should otherwise be self-contained.
Output to command prompt:
>test-logback.cmd
Logging with logback
Message length: 62732
Logging with logback
Message length: 62731
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa[...]
Output in logfile.0.log
Logging with logback
Message length: 62732
aaaaaaaaaaaaaaaaaaaaaaaaaaa[....]
Logging with logback
Message length: 62731
aaaaaaaaaaaaaaaaaaaaaaaaa[...]
|