Use a custom logging handler.