🔧 chore(main.py): configure logger in create_app function to improve logging configuration

🔧 chore(logger.py): change default log level to DEBUG in configure function for more detailed logging
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-07-21 23:58:28 -03:00
commit 564b113c3a
2 changed files with 16 additions and 9 deletions

View file

@ -6,7 +6,7 @@ from rich.logging import RichHandler
logger = logging.getLogger("langflow")
def configure(log_level: str = "INFO", log_file: Path = None): # type: ignore
def configure(log_level: str = "DEBUG", log_file: Path = None): # type: ignore
log_format = "%(asctime)s - %(levelname)s - %(message)s"
log_level_value = getattr(logging, log_level.upper(), logging.INFO)
@ -28,7 +28,3 @@ def configure(log_level: str = "INFO", log_file: Path = None): # type: ignore
logger.info(f"Logger set up with log level: {log_level_value}({log_level})")
if log_file:
logger.info(f"Log file: {log_file}")
# Configure default logger
configure()