im trying to read multiple lines of a jetty log, for a source does anyone now how to do it?
<source>
type tail
format multiline
format_firstline /^\[/
format1 /^\[[^ ]* (?<time>[^\]]*)\] *(?<level>[^ ]*) $/
path /mnt/current/log/jettylog4j.log
pos_file /mnt/current/log/fluentd.jettylog4j.pos
read_from_head true
tag jettylog
refresh_interval 30
</source>
With this I don't manage to have the messages with all the lines.
In my case I cannot change the format as is part of the legacy code. I found a pattern that works for me. I put it here in case is useful for someone
<source>
type tail
format multiline
format_firstline /^\[/
format1 /^\[[^ ]* (?<time>[^\]]*)\] *(?<level>[^ ]*) (?<message>[^\n]*(\n^[^\[].*|$))/
path /mnt/current/log/jettylog4j.log
pos_file /mnt/current/log/fluentd.jettylog4j.pos
read_from_head true
tag jettylog
refresh_interval 30
</source>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With