move logger out from a config setting to a second argument in the function call