adjusted logger to use factory