Help on format #208
-
I'm trying to configure format to read logs formatted as follows:
However for all my attempts, I end up with the dreaded: As these are log4j logs, I first tried with this: format = { As it failed, and as I didn't find how to specify the 'T' between date and time, and the zone after ms, I tried the following regex format: format = { But it doesn't work either.... Could someone help with to find what's wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
The right format is 'T' separator can be specified using |
Beta Was this translation helpful? Give feedback.
-
@sevdokimov thanks for fixing my errors, it works now! |
Beta Was this translation helpful? Give feedback.
The right format is
pattern: "%date{yyyy-MM-dd'T'HH:mm:ss:SSSX} %-5level %thread %logger{35}:%line %msg%n"
.'T' separator can be specified using
'T'
. Your pattern has.
separator between seconds and milliseconds, but the log has:
. Also you didn't specified timezone (X
).There is a line number after the class name, so I added
:%line
after%logger{35}