From ca5095bc1b39af1f24c32bfea4653028739a0283 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Thu, 27 Apr 2023 13:20:24 +0300 Subject: [PATCH] Updated for logging --- slpkg/check_updates.py | 4 ++++ slpkg/logging_config.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/slpkg/check_updates.py b/slpkg/check_updates.py index d5ca6904..4fb2f820 100644 --- a/slpkg/check_updates.py +++ b/slpkg/check_updates.py @@ -55,6 +55,10 @@ class CheckUpdates(Configs): else: self.sbo_repository() + logger = logging.getLogger(__name__) + logger.info('%s: %s: %s:', self.__class__.__name__, + self.__class__.check.__name__, self.compare) + return self.compare def binary_repository(self, repo) -> None: diff --git a/slpkg/logging_config.py b/slpkg/logging_config.py index b542a393..434edda0 100644 --- a/slpkg/logging_config.py +++ b/slpkg/logging_config.py @@ -11,4 +11,4 @@ class LoggingConfig: encoding: str = 'utf-8' root_slpkg: Path = Path(Path.home(), '.slpkg') log_path: Path = Path(root_slpkg, 'logs') - log_file: Path = Path(log_path, 'errors_slpkg.log') + log_file: Path = Path(log_path, 'slpkg.log')