diff --git a/src/pygptcourse/otel_decorators.py b/src/pygptcourse/otel_decorators.py index 900cf91..b31fe39 100644 --- a/src/pygptcourse/otel_decorators.py +++ b/src/pygptcourse/otel_decorators.py @@ -17,8 +17,11 @@ from opentelemetry.sdk.trace.export import BatchSpanProcessor from opentelemetry.trace import get_tracer_provider, set_tracer_provider +# isort: off from pygptcourse.credentials import OpenTelemetryCredentials +# isort: on + logging.getLogger().setLevel(logging.INFO) diff --git a/src/pygptcourse/tshirt_launcher.py b/src/pygptcourse/tshirt_launcher.py index 60c47f5..e158afd 100644 --- a/src/pygptcourse/tshirt_launcher.py +++ b/src/pygptcourse/tshirt_launcher.py @@ -9,8 +9,11 @@ import usb.core # type: ignore import usb.util # type: ignore +# isort: off from pygptcourse.otel_decorators import otel_handler +# isoft: on + logger = logging.getLogger(__name__) @@ -228,7 +231,7 @@ def send_command(self, command): self.command = command self.dev.ctrl_transfer(0x21, 0x09, 0x200, 0, [command]) except usb.core.USBError as e: - logger.warning("SEND ERROR", e) + logger.warning(f"SEND ERROR {e}") @otel_handler.trace def move(self, command, duration): @@ -237,7 +240,7 @@ def move(self, command, duration): time.sleep(duration) self.send_command(STOP) except usb.core.USBError as e: - logger.warning("SEND ERROR", e) + logger.warning(f"SEND ERROR {e}") @otel_handler.trace def fire(self):