Change formatter of a logger.