From cc227c0ce9743a3db14b9e5ad352e1ff7b1738da Mon Sep 17 00:00:00 2001 From: Lucjan Dudek Date: Mon, 3 Apr 2023 13:18:39 +0200 Subject: [PATCH] Move logger yapapi import to enable_logger function --- dapp_runner/log.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dapp_runner/log.py b/dapp_runner/log.py index 3c21de7..d912101 100644 --- a/dapp_runner/log.py +++ b/dapp_runner/log.py @@ -3,9 +3,6 @@ import warnings from typing import Optional -from yapapi import __version__ as yapapi_version -from yapapi.log import _YagnaDatetimeFormatter # noqa - logger = logging.getLogger(__name__) LOG_CRITICAL = "CRITICAL" @@ -47,6 +44,8 @@ def enable_logger( By default, it outputs `INFO` level logs to stderr and `DEBUG` level logs for `yapapi` and the REST APIs to the specified log file. """ + from yapapi import __version__ as yapapi_version + from yapapi.log import _YagnaDatetimeFormatter api_log_level = api_log_level or file_log_level