From 7295d474944f53b65eee2e2fb4c971f304a031ea Mon Sep 17 00:00:00 2001 From: Spencer Presley <153392395+SpencerPresley@users.noreply.github.com> Date: Tue, 17 Dec 2024 13:29:47 -0500 Subject: [PATCH] color formmatter fix --- pyproject.toml | 2 +- src/academic_metrics/configs/global_config.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index fee75a4..6d45f77 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "academic_metrics" -version = "1.0.3" +version = "1.0.4" description = "A tool to extract and format academic data from Web of Science and Crossref" authors = [ { name = "Spencer Presley", email = "spencerpresley96@gmail.com" }, diff --git a/src/academic_metrics/configs/global_config.py b/src/academic_metrics/configs/global_config.py index 63c0514..850d01b 100644 --- a/src/academic_metrics/configs/global_config.py +++ b/src/academic_metrics/configs/global_config.py @@ -103,12 +103,13 @@ def format(self, record: logging.LogRecord) -> str: _config_file_formatter = logging.Formatter( "%(asctime)s - %(name)s - %(levelname)s - %(message)s" ) - _config_color_formatter = ColorFormatter( - "%(asctime)s - %(name)s - %(levelname)s - %(message)s" - ) _file_handler.setFormatter(_config_file_formatter) _config_logger.addHandler(_file_handler) + _config_color_formatter = ColorFormatter( + "%(asctime)s - %(name)s - %(levelname)s - %(message)s" + ) + if LOG_TO_CONSOLE: _console_handler = logging.StreamHandler() _console_handler.setLevel(LOG_LEVEL)