Add auto-generated function to print log records.