swap print for logger