backport Logger monkey patches