parse chrono log and add code switch function