Could you please deprecate this method and use current_app.logger.error instead?