This reminds me: we should rework this class/method to have `log` stored as a attribute so we don't need to pass log in to this class.
(Future work; doing this will make it easier to use this from within XCom or Variable class.)
Originally posted by @ashb in #44590 (comment)