add logger and attach