Check logger for DEBUG before calling log_pprint