RFE: Add CONF.trace option

Bug #1620789 reported by Matt Riedemann on 2016-09-06
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo.log
Wishlist
Matt Riedemann

Bug Description

There is a LOG.trace method and a TRACE level:

https://github.com/openstack/oslo.log/blob/d56c3e941c6c7f5861311cae54625551053f2e26/oslo_log/handlers.py#L33

But no way to configure it's usage, like we have for CONF.debug and CONF.verbose.

I think the only way you can get TRACE logging today is via CONF.default_log_levels, but that's not very useful in a service like nova.

We'd have to update oslo_log.log._refresh_root_level also to check CONF.trace:

https://github.com/openstack/oslo.log/blob/d56c3e941c6c7f5861311cae54625551053f2e26/oslo_log/log.py#L330

For something like this:

    if CONF.trace:
        log_root.setLevel(TRACE)

For context, we want to drop some nova-scheduler logs from DEBUG to TRACE here:

https://review.openstack.org/#/c/366283/

But there isn't a way to turn those on.

Matt Riedemann (mriedem) on 2016-09-06
description: updated

Fix proposed to branch: master
Review: https://review.openstack.org/366422

Changed in oslo.log:
assignee: nobody → Matt Riedemann (mriedem)
status: New → In Progress
Changed in oslo.log:
assignee: Matt Riedemann (mriedem) → Joshua Harlow (harlowja)

Change abandoned by Matt Riedemann (<email address hidden>) on branch: master
Review: https://review.openstack.org/366422
Reason: meh

Changed in oslo.log:
status: In Progress → New
status: New → Triaged
importance: Undecided → Wishlist
assignee: Joshua Harlow (harlowja) → nobody

Change abandoned by Joshua Harlow (<email address hidden>) on branch: master
Review: https://review.openstack.org/366497

Changed in oslo.log:
assignee: nobody → Matt Riedemann (mriedem)
status: Triaged → In Progress

Change abandoned by Matt Riedemann (<email address hidden>) on branch: master
Review: https://review.opendev.org/366422
Reason: I guess people can just add nova.scheduler=TRACE to default_log_levels if they want to try and trace that code.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers