Print Processes and its messages from a given log file. | Algorithms
There is an application that has several processes running in parallel and each process prints the logs in a single log file. Log message contains the process name, timestamp, message type (WARN, ERROR, etc) and actual message. You have given start timestamp and end timestamp. Write an algorithm to process the log file and combine messages as per the message types within the start and end timestamp and also find Top 2 Services with the most number of messages Sample Logfile: Timestamp|Process|MessageType|Message 1540403503|S1|WARN|warning message 1540403503|S2|ERROR|warning message Output: S1 - 1 WARN / S2 - 1 ERROR /