DB queries log entries are duplicated
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oslo-incubator |
Fix Released
|
Medium
|
Eugeniya Kudryashova |
Bug Description
In oslo.db we can enable logging of DB queries by the means of CONF.database.
But we also set up handlers for the root logger in openstack.
To fix this we need to stop passing echo=True to create_engine() in oslo.db and replace it with setting the correct log level directly on the logger (in this case it's 'sqlalchemy.
Snippet to reproduce (it's not using oslo code, but effectively behaves the same way):
import logging
import sqlalchemy as sa
# this is a simplified version of what we are doing in openstack.
root = logging.getLogger()
root.addHandler
# log entries of DB queries are duplicated
eng = sa.create_
eng.execute('select 1;')
Changed in oslo: | |
assignee: | nobody → Eugeniya Kudryashova (ekudryashova) |
Changed in oslo: | |
importance: | Undecided → Medium |
Changed in oslo: | |
milestone: | none → icehouse-3 |
Changed in oslo: | |
status: | Fix Committed → Fix Released |
Changed in oslo: | |
milestone: | icehouse-3 → 2014.1 |
Fix proposed to branch: master /review. openstack. org/72669
Review: https:/