I have the following log structure: 2023-11-25T21:18:54.244444 [ info ] I am a log message request = GET /api/myendpoint request_id = ff223452 I can capture the date and time (without the 244444 part) using: rex field=myfield "(?<timestamp>\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2})\.\d+" and timestamp is properly captured. But if I try to extend this and want to capture the log level as well with for example: rex field=myfield "(?<timestamp>\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2})\.\d+\s+\[\s*(?<loglevel>\w+)\s*\]\s+" It didn't work; none of the timestamp nor the loglevel is captured. What am I doing wrong?
... View more