Hi there. I have a problem when parsing logfiles that contain lines with a variable count of spaces between words. Our logging framework inserts a variable count of spaces (not tabs) between the loglevel and the message like in this example:
2022.07.06-00:33:10.511 - warn: A warning
2022.07.06-00:33:10.623 - info: Some info
2022.07.06-00:33:12.743 - error: This is an error
The error line has fewer spaces than info or warn lines. The only pattern for the pattern parser that works for me is:
%d{yyyy.MM.dd-HH:mm:ss.fff} - %p:%m%n
The only "problem" with this pattern is that the message is not trimmed meaning there are leading spaces. Is there a way to eliminate these leading spaces?