]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- default the root logger level only if unset
authorJason Kirtland <jek@discorporate.us>
Wed, 16 Jan 2008 18:10:08 +0000 (18:10 +0000)
committerJason Kirtland <jek@discorporate.us>
Wed, 16 Jan 2008 18:10:08 +0000 (18:10 +0000)
lib/sqlalchemy/logging.py

index 4711b315577015dd278d77767e7f36831ff75ac9..13872caa3850da70dba89e7f542d95e92ead3398 100644 (file)
@@ -38,7 +38,8 @@ logging = __import__('logging')
 SADeprecationWarning = sa_exc.SADeprecationWarning
 
 rootlogger = logging.getLogger('sqlalchemy')
-rootlogger.setLevel(logging.WARN)
+if rootlogger.level == logging.NOTSET:
+    rootlogger.setLevel(logging.WARN)
 warnings.filterwarnings("once", category=sa_exc.SADeprecationWarning)
 
 default_enabled = False