Skip to content

Commit f5e0666

Browse files
committed
changed sync worker logger
1 parent edf723f commit f5e0666

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ellar/threading/sync_worker.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
_Item = t.TypeVar("_Item")
1919

20-
logger = logging.getLogger("ellar.sync_worker")
20+
logger = logging.getLogger("ellar")
2121

2222

2323
class _Sentinel(enum.Enum):
@@ -96,7 +96,7 @@ def run(self) -> None:
9696
except (SystemExit, KeyboardInterrupt): # pragma: no cover
9797
pass
9898
except Exception as ex:
99-
logger.error(ex)
99+
logger.exception(ex)
100100
finally:
101101
loop.run_until_complete(loop.shutdown_asyncgens())
102102
loop.stop()
@@ -191,6 +191,7 @@ async def async_context_manager_wrapper(self, agen: t.AsyncContextManager) -> No
191191
self.stream_block.wait()
192192
except Exception as e:
193193
self.stream_queue.put((e, None))
194+
logger.exception(e)
194195

195196
def interrupt_generator(self) -> None:
196197
self.agen_shutdown = True

0 commit comments

Comments
 (0)