Fix the pretty printer

Use log parser instead of manual parsing