You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@burr.apache.org by sk...@apache.org on 2026/05/11 05:06:36 UTC
(burr) branch main updated: fix: use module logger instead of root logger in b_aiosqlite.py
This is an automated email from the ASF dual-hosted git repository.
skrawcz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/burr.git
The following commit(s) were added to refs/heads/main by this push:
new 7b204920 fix: use module logger instead of root logger in b_aiosqlite.py
7b204920 is described below
commit 7b2049209cbc81ec2ba764e5b2aae9f21e0bd7f9
Author: Cao Hanzhe <da...@users.noreply.github.com>
AuthorDate: Thu May 7 22:04:59 2026 +0800
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.
---
burr/integrations/persisters/b_aiosqlite.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/burr/integrations/persisters/b_aiosqlite.py b/burr/integrations/persisters/b_aiosqlite.py
index a75eb682..8439b965 100644
--- a/burr/integrations/persisters/b_aiosqlite.py
+++ b/burr/integrations/persisters/b_aiosqlite.py
@@ -26,7 +26,7 @@ from burr.common.types import BaseCopyable
from burr.core import State
from burr.core.persistence import AsyncBaseStatePersister, PersistedStateData
-logger = logging.getLogger()
+logger = logging.getLogger(__name__)
try:
from typing import Self