replaced custom logger function solution with psr\LoggerInterface