logger hook