Move variable assignment within logging block.