]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
set global 'sqlalchemy' log level to ERROR so it is insulated from other logging...
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 23 Oct 2006 18:10:10 +0000 (18:10 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 23 Oct 2006 18:10:10 +0000 (18:10 +0000)
lib/sqlalchemy/logging.py

index 876785b0d926fed02f1cd45d3960ab75de22c37b..b3960ba861c4396086c4cc2b75bfed261f4c274a 100644 (file)
@@ -29,6 +29,9 @@ import sys
 # py2.5 absolute imports will fix....
 logging = __import__('logging')
 
+# turn off logging at the root sqlalchemy level
+logging.getLogger('sqlalchemy').setLevel(logging.ERROR)
+
 default_enabled = False
 def default_logging(name):
     global default_enabled
@@ -37,7 +40,6 @@ def default_logging(name):
     if not default_enabled:
         default_enabled = True
         rootlogger = logging.getLogger('sqlalchemy')
-        rootlogger.setLevel(logging.NOTSET)
         handler = logging.StreamHandler(sys.stdout)
         handler.setFormatter(logging.Formatter('%(asctime)s %(levelname)s %(name)s %(message)s'))
         rootlogger.addHandler(handler)