Skip to content

Commit cb1de86

Browse files
committed
More fitting logger name.
1 parent 03bea55 commit cb1de86

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

c8y_tk/app/subscription_listener.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,17 @@ def __init__(
5353
microservice is considered to be "added" (the callback
5454
invocation will be delayed by this).
5555
"""
56+
instance_id = f'[{self._n}]' if self._n > 1 else ''
5657
self._n = self._n + 1
57-
self._instance_name = type(self).__name__ + (f'[{self._n}]' if self._n > 1 else '')
58+
self._instance_name = type(self).__name__ + instance_id
5859
self.app = app
5960
self.max_threads = max_threads
6061
self.startup_delay = startup_delay
6162
self.polling_interval = polling_interval
6263
self.callbacks = [(callback, blocking)] if callback else []
6364
self.callbacks_on_add = []
6465
self.callbacks_on_remove = []
65-
self._log = logging.getLogger(f'{__name__}.{self._instance_name}')
66+
self._log = logging.getLogger(__name__ + instance_id)
6667
self._executor = None
6768
self._callback_futures = set()
6869
self._listen_thread = None

0 commit comments

Comments
 (0)