diff --git a/ansibledoctor/doc_generator.py b/ansibledoctor/doc_generator.py index e85156a..13e06ae 100644 --- a/ansibledoctor/doc_generator.py +++ b/ansibledoctor/doc_generator.py @@ -85,10 +85,12 @@ class Generator: and not self.config.config["dry_run"] ): files_to_overwite_string = "\n".join(files_to_overwite) - self.logger.warning(f"This files will be overwritten:\n{files_to_overwite_string}") + prompt = f"These files will be overwritten:\n{files_to_overwite_string}".replace( + "\n", "\n... " + ) try: - if not FileUtils.query_yes_no("Do you want to continue?"): + if not FileUtils.query_yes_no(f"{prompt}\nDo you want to continue?"): self.log.sysexit_with_message("Aborted...") except ansibledoctor.exception.InputError as e: self.logger.debug(str(e)) diff --git a/ansibledoctor/utils/__init__.py b/ansibledoctor/utils/__init__.py index ed95ff7..64cf0bb 100644 --- a/ansibledoctor/utils/__init__.py +++ b/ansibledoctor/utils/__init__.py @@ -129,7 +129,7 @@ class MultilineFormatter(logging.Formatter): """Reset color after newline characters.""" def format(self, record): # noqa - record.msg = record.msg.replace("\n", f"\n{colorama.Style.RESET_ALL}... ") + record.msg = record.msg.strip().replace("\n", f"\n{colorama.Style.RESET_ALL}... ") return logging.Formatter.format(self, record) @@ -236,7 +236,7 @@ class Log: handler.addFilter(LogFilter(logging.DEBUG)) handler.setFormatter( MultilineFormatter( - self.critical( + self.debug( CONSOLE_FORMAT.format( colorama.Fore.BLUE, colorama.Style.BRIGHT, colorama.Style.RESET_ALL )