From d9d88c0f69da797145c7b9d57db82c980f2b1d15 Mon Sep 17 00:00:00 2001 From: JGStew Date: Thu, 29 Aug 2024 19:52:23 -0400 Subject: [PATCH] change logging function to return config --- src/besapi/plugin_utilities.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/besapi/plugin_utilities.py b/src/besapi/plugin_utilities.py index 89bfb01..b7381a9 100644 --- a/src/besapi/plugin_utilities.py +++ b/src/besapi/plugin_utilities.py @@ -115,14 +115,14 @@ def setup_plugin_logging(log_file_path="", verbose=0, console=True): handlers.append(logging.StreamHandler()) print("INFO: also logging to console") - # setup logging: - logging.basicConfig( - encoding="utf-8", - level=log_level, - format="%(asctime)s %(levelname)s:%(message)s", - handlers=handlers, - force=True, - ) + # return logging config: + return { + "encoding": "utf-8", + "level": log_level, + "format": "%(asctime)s %(levelname)s:%(message)s", + "handlers": handlers, + "force": True, + } def get_besapi_connection(args):