Remove local variable only used in logging.

Kill off the locals() call as well. Just directly calculate the value.

Change-Id: I6b96d08a16feb125d1eb9162ca186bf37b429cd6
Merge "Remove local variable only used in logging."