HHH-8180 Checks for logging level. Logging level check moved to variable
outside for loop.