Handle Multiline logs, where number of lines are not sure?

I need a way to handle multi line logs, where number of lines are not sure, below is the log data, where start

[29-Apr-2018 16:46:32]  [pool int-mobileapp] pid 30064
script_filename = /var/www/html/int-mobileapp/index.php
[0x00007f91b7c1c840] oci_execute() /var/www/html/int-mobileapp/system/database/drivers/oci8/oci8_driver.php:286
[0x00007f91b7c1c7c0] _execute() /var/www/html/int-mobileapp/system/database/DB_driver.php:791
[0x00007f91b7c1c750] simple_query() /var/www/html/int-mobileapp/system/database/DB_driver.php:654

I can handle multilne logs using multiline codec in input however, i have no idea about handeling the unknow number of line that should be groked,I want the output in following pattern,

"date" => "29-Apr-2018 16:46:32"
"server" => "pool int-mobileapp"
"pid" => "30064"
"script_filename" => "/var/www/html/int-mobileapp/index.php"
"function" => [ "oci_execute()", "_execute()", "simple_query()" ]
"path" => ["/var/www/html/int-mobileapp/system/database/drivers/oci8/oci8_driver.php" , "/var/www/html/int-mobileapp/system/database/DB_driver.php", "/var/www/html/int-mobileapp/system/database/DB_driver.php"]
"line_number" => ["286", "791", "654"]

How can I accomplish this?
Thanks a lot!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.