added logService wih factory method