updated logger to use listener.