Write a program to parse a large, complex log file and extract specific error metrics under strict memory constraints.