properly pass $logger object