to rewrite logger