perf: Loglines are prepared regardless of log level

Bug #1232327 reported by Kurt Griffiths
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zaqar
Fix Released
Low
Zhihao Yuan

Bug Description

Log messages are typically formatted regardless of whether they will actually be written out, depending on the effective log level

It would be nice if we could make the formatting conditional, perhaps by extending the logger so it accepts two parameters : the template and the params to substitute into that template.

Allele Dev (alleledev)
Changed in marconi:
status: New → Triaged
Revision history for this message
Flavio Percoco (flaper87) wrote :

There's some work going on i18n and lazy translation / formatting, IIRC. I think that should help with most of the cases. For all the other cases, I think this is a great idea.

Also, this sounds like something we could send to oslo-incubator.

Zhihao Yuan (zyuan)
Changed in marconi:
assignee: nobody → Zhihao Yuan (zyuan)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to marconi (master)

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

Changed in marconi:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to marconi (master)

Reviewed: https://review.openstack.org/54206
Committed: http://github.com/openstack/marconi/commit/3b111c3ac1ff1175a54aa6343c330292182db757
Submitter: Jenkins
Branch: master

commit 3b111c3ac1ff1175a54aa6343c330292182db757
Author: Zhihao Yuan <email address hidden>
Date: Mon Oct 28 19:02:56 2013 -0400

    feat(logging): format msg when log level met

    This is a feature supported by the logging module; just let the
    logging function perform the formatting.

    Change-Id: I9e349c6bda942474bfe73150b5abb8feb79ed574
    Closes-Bug: 1232327

Changed in marconi:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in marconi:
milestone: none → icehouse-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in marconi:
milestone: icehouse-1 → 2014.1
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.