Improved logging to support delayed logging for promise values.