How to parse all the log file inside a directory using a similar pattern and do calculations using python : I have a code that reads all the lines from multiple log file inside a directory using a given pattern:
here is the code


Now what the output of the above code gives me all the required lines from the log file with the time stamp.

./xxxxx.xxxxxx.xxxxxxx.v1.0_Final:2019-01-30 08:34:46.463 -0800 INFO [626] - Program Ended: xxxxxx::xxxxx::xxxxx::xxxxxxx for exports [logfilenamexxxx] [xxxxxx_xxxxx] pid 626 user sthapa after 00:26:15

.....................and so on..
So i want to fetch all the last lines that contains the timestamp i.e. 00:26:15
and calculate the total and average time for all the timstamp collected from those log files.

Please help me with the issue......


