Skip to content

Commit 7b20492

Browse files
dashitongzhiskrawcz
authored andcommitted
fix: use module logger instead of root logger in b_aiosqlite.py
All other persister modules in burr/integrations/persisters/ use logging.getLogger(__name__) to create a properly scoped logger. b_aiosqlite.py was using logging.getLogger() (no arguments), which returns the root logger. Using the root logger is bad practice because: - It causes log messages to bypass the module's namespace, making it harder to filter or configure logging for this specific module. - It can lead to unexpected log output appearing in the root logger's handlers even when the module's logging is intended to be suppressed. This one-line fix changes it to logging.getLogger(__name__) for consistency with all other persister implementations.
1 parent 0e883bb commit 7b20492

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

burr/integrations/persisters/b_aiosqlite.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
from burr.core import State
2727
from burr.core.persistence import AsyncBaseStatePersister, PersistedStateData
2828

29-
logger = logging.getLogger()
29+
logger = logging.getLogger(__name__)
3030

3131
try:
3232
from typing import Self

0 commit comments

Comments
 (0)