RFE: Add CONF.trace option

Bug #1620789 reported by Matt Riedemann
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo.log
Won't Fix
Wishlist
Unassigned

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)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo.log (master)

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)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on oslo.log (master)

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
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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.

Revision history for this message
Takashi Kajinami (kajinamit) wrote :

Closing based on the above comment.

Changed in oslo.log:
assignee: Matt Riedemann (mriedem) → nobody
status: In Progress → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.