Skip to content

Commit

Permalink
fix import
Browse files Browse the repository at this point in the history
  • Loading branch information
yocalebo committed Dec 14, 2024
1 parent cbb4505 commit f17ae59
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/middlewared/middlewared/apps/websocket_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
RpcWebSocketAppEvent,
)
from middlewared.job import Job
from middlewared.logger import logger
from middlewared.logger import Logger

from middlewared.schema import Error as SchemaError
from middlewared.service_exception import (
Expand Down Expand Up @@ -51,7 +51,7 @@ def __init__(
self.request = request
self.response = response
self.handshake = False
self.logger = logger.Logger("application").getLogger()
self.logger = Logger("websock_app").getLogger()
# Allow atmost 10 concurrent calls and only queue up until 20
self._softhardsemaphore = SoftHardSemaphore(10, 20)
self._py_exceptions = False
Expand Down
6 changes: 2 additions & 4 deletions src/middlewared/middlewared/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@

from truenas_api_client import json

from . import logger
from .logger import Logger

SYSTEMD_EXTEND_USECS = 240000000 # 4mins in microseconds

Expand Down Expand Up @@ -99,9 +99,7 @@ def __init__(
print_version=True,
):
super().__init__()
self.logger = logger.Logger(
'middlewared', debug_level, log_format
).getLogger()
self.logger = Logger('middlewared', debug_level, log_format).getLogger()
if print_version:
self.logger.info('Starting %s middleware', sw_version())
self.loop_debug = loop_debug
Expand Down

0 comments on commit f17ae59

Please sign in to comment.