Hello.
I have a log file with similar estructure:
05 Feb 2021 14:00:00,213 [AAA-11] INFO - Line A:[0]
05 Feb 2021 14:00:00,231 [AAA-11] INFO - Line2:[0]
05 Feb 2021 14:00:00,231 [AAA-11] INFO - Line3[: 0]
05 Feb 2021 14:00:01,213 [AAA-11] INFO - Line A:[0]
05 Feb 2021 14:00:01,231 [AAA-11] INFO - Line2:[0]
05 Feb 2021 14:00:01,231 [AAA-11] INFO - Line3[: 0]
05 Feb 2021 14:00:02,213 [AAA-11] INFO - Init Log
05 Feb 2021 14:00:02,213 [AAA-11] INFO - select name1
05 Feb 2021 14:00:02,213 [AAA-11] INFO - Include important info1
05 Feb 2021 14:00:02,231 [AAA-11] INFO - message
<xml1>
<tag1>Value 1</tag1>
<tag2>Value 2</tag2>
</xml1>
05 Feb 2021 14:00:03,131 [AAA-11] INFO - Include other important info: <xml2><tag1>Value 1</tag1><tag2>Value 2</tag2></xml2>
05 Feb 2021 14:00:03,131 [AAA-11] INFO - end log
05 Feb 2021 14:00:03,213 [AAA-11] INFO - Line A:[0]
05 Feb 2021 14:00:03,231 [AAA-11] INFO - Line2:[0]
05 Feb 2021 14:00:03,231 [AAA-11] INFO - Line3[: 0]
05 Feb 2021 14:00:04,213 [AAA-11] INFO - Line A:[0]
05 Feb 2021 14:00:04,231 [AAA-11] INFO - Line2:[0]
05 Feb 2021 14:00:04,231 [AAA-11] INFO - Line3[: 0]
05 Feb 2021 14:00:05,213 [AAA-11] INFO - Line A:[0]
05 Feb 2021 14:00:05,231 [AAA-11] INFO - Line2:[0]
05 Feb 2021 14:00:05,231 [AAA-11] INFO - Line3[: 0]
05 Feb 2021 14:01:00,213 [AAA-11] INFO - Line A:[0]
05 Feb 2021 14:01:00,231 [AAA-11] INFO - Line2:[0]
05 Feb 2021 14:01:00,231 [AAA-11] INFO - Line3[: 0]
05 Feb 2021 14:01:01,213 [AAA-11] INFO - Line A:[0]
05 Feb 2021 14:01:01,231 [AAA-11] INFO - Line2:[0]
05 Feb 2021 14:01:01,231 [AAA-11] INFO - Line3[: 0]
05 Feb 2021 14:01:02,213 [AAA-11] INFO - Init Log
05 Feb 2021 14:01:02,213 [AAA-11] INFO - select name2
05 Feb 2021 14:01:02,213 [AAA-11] INFO - Include inportant info2
05 Feb 2021 14:01:02,231 [AAA-11] INFO - message
<xml1>
<tag1>Value 1</tag1>
<tag2>Value 2</tag2>
</xml1>
05 Feb 2021 14:01:03,131 [AAA-11] INFO - Include other important info: <xml2><tag1>Value 1</tag1><tag2>Value 2</tag2></xml2>
05 Feb 2021 14:01:03,131 [AAA-11] INFO - end log
05 Feb 2021 14:01:03,213 [AAA-11] INFO - Line A:[0]
05 Feb 2021 14:01:03,231 [AAA-11] INFO - Line2:[0]
05 Feb 2021 14:01:03,231 [AAA-11] INFO - Line3[: 0]
05 Feb 2021 14:01:04,213 [AAA-11] INFO - Line A:[0]
05 Feb 2021 14:01:04,231 [AAA-11] INFO - Line2:[0]
05 Feb 2021 14:01:04,231 [AAA-11] INFO - Line3[: 0]
05 Feb 2021 14:01:05,213 [AAA-11] INFO - Line A:[0]
05 Feb 2021 14:01:05,231 [AAA-11] INFO - Line2:[0]
05 Feb 2021 14:01:05,231 [AAA-11] INFO - Line3[: 0]
I need to get something like this:
{
"timestamp":"05 Feb 2021 14:00:02,213"
"select": "name1",
"Include": "inportant info2",
"message": {
"xml1":{
"tag1": "Value 1"
"tag2": "Value 2"
}
},
"info" {
"xml2":{
"tag1": "Value 1"
"tag2": "Value 2"
}
}
}
I currently use multiline to separate the logs by blocks