Move parsing of a single log line to its own function