summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/logging.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2006-10-23 18:10:10 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2006-10-23 18:10:10 +0000
commit32d872ddd8e8f96e72c5c30540e5a4e6d7de11ba (patch)
tree13ad1f6b4c95a6574206c0dde8b98ca20633b670 /lib/sqlalchemy/logging.py
parent749ac647d74d8313571a82f62981c05720932d45 (diff)
downloadsqlalchemy-32d872ddd8e8f96e72c5c30540e5a4e6d7de11ba.tar.gz
set global 'sqlalchemy' log level to ERROR so it is insulated from other logging configs [ticket:353]
Diffstat (limited to 'lib/sqlalchemy/logging.py')
-rw-r--r--lib/sqlalchemy/logging.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sqlalchemy/logging.py b/lib/sqlalchemy/logging.py
index 876785b0d..b3960ba86 100644
--- a/lib/sqlalchemy/logging.py
+++ b/lib/sqlalchemy/logging.py
@@ -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)