Doing actual work within a logger statement is a smelly smell.  This should probably be save to a variable on the previous line.