Skip to content

Commit

Permalink
Merge pull request #108 from golemfactory/ld/fix-slow-LOG_CHOICES-import
Browse files Browse the repository at this point in the history
Move logger yapapi import to enable_logger function
  • Loading branch information
lucekdudek authored Apr 4, 2023
2 parents ec8540f + 0d6ba6b commit 84afa45
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions dapp_runner/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 84afa45

Please sign in to comment.