Log level info (verbose) shouldn't log SQL queries

Bug #1013235 reported by Dan Prince on 2012-06-14
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Low
Dan Prince

Bug Description

I want to run glance at log level INFO (verbose log setting in the config file) but I really dislike that I see SQL queries in the log files at this log level:

2012-06-14 12:59:25 INFO [sqlalchemy.engine.base.Engine] {'id_1': u'8b26b85b-9a3f-42eb-8748-b41b31dac995'}
2012-06-14 13:00:21 INFO [sqlalchemy.engine.base.Engine] SELECT images.created_at AS images_created_at, images.updated_at AS images_updated_at, images.deleted_at AS images_deleted_at, images.deleted AS images_deleted, images.id AS images_id, images.name AS images_name, images.disk_format AS images_disk_format, images.container_format AS images_container_format, images.size AS images_size, images.status AS images_status, images.is_public AS images_is_public, images.location AS images_location, images.checksum AS images_checksum, images.min_disk AS images_min_disk, images.min_ram AS images_min_ram, images.owner AS images_owner, images.protected AS images_protected, image_properties_1.created_at AS image_properties_1_created_at, image_properties_1.updated_at AS image_properties_1_updated_at, image_properties_1.deleted_at AS image_properties_1_deleted_at, image_properties_1.deleted AS image_properties_1_deleted, image_properties_1.id AS image_properties_1_id, image_properties_1.image_id AS image_properties_1_image_id, image_properties_1.name AS image_properties_1_name, image_properties_1.value AS image_properties_1_value, image_members_1.created_at AS image_members_1_created_at, image_members_1.updated_at AS image_members_1_updated_at, image_members_1.deleted_at AS image_members_1_deleted_at, image_members_1.deleted AS image_members_1_deleted, image_members_1.id AS image_members_1_id, image_members_1.image_id AS image_members_1_image_id, image_members_1.member AS image_members_1_member, image_members_1.can_share AS image_members_1_can_share
FROM images LEFT OUTER JOIN image_properties AS image_properties_1 ON images.id = image_properties_1.image_id LEFT OUTER JOIN image_members AS image_members_1 ON images.id = image_members_1.image_id
WHERE images.id = %(id_1)s
2012-06-14 13:00:21 INFO [sqlalchemy.engine.base.Engine] {'id_1': u'8b26b85b-9a3f-42eb-8748-b41b31dac995'}

---

I propose we hide SQL logging at log level INFO and only show it at the DEBUG level.

Dan Prince (dan-prince) on 2012-06-14
Changed in glance:
assignee: nobody → Dan Prince (dan-prince)
importance: Undecided → Low
status: New → In Progress

Reviewed: https://review.openstack.org/8543
Committed: http://github.com/openstack/glance/commit/1b78c75bb606a22df0d7d51a30e7695861ef685c
Submitter: Jenkins
Branch: master

commit 1b78c75bb606a22df0d7d51a30e7695861ef685c
Author: Dan Prince <email address hidden>
Date: Thu Jun 14 11:48:27 2012 -0400

    Turn off SQL query logging at log level INFO.

    Fixes LP Bug #1013235.

    Change-Id: I5651a4f22bc396d7d082f95b1ef6df107b943fb5

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2012-07-04
Changed in glance:
milestone: none → folsom-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-09-27
Changed in glance:
milestone: folsom-2 → 2012.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers