NeutronCommand requires subclass unnecessary log = logging.getLogger lines

Bug #1258028 reported by Isaku Yamahata
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-neutronclient
Fix Released
Low
Isaku Yamahata

Bug Description

    It is a common pattern to add
    class XXXCommand(NeutronCommand):
        log = logging.getLogger(__name__ + '.<command name>').

But the logger name can be determined automatically, so it caused unnecessary code template.
They can be eliminated

Changed in python-neutronclient:
assignee: nobody → Isaku Yamahata (yamahata)
status: New → In Progress
Changed in python-neutronclient:
importance: Undecided → Medium
importance: Medium → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-neutronclient (master)

Reviewed: https://review.openstack.org/59310
Committed: https://git.openstack.org/cgit/openstack/python-neutronclient/commit/?id=4164de2bdb48eaacc58a70790aadb21b78cbf723
Submitter: Jenkins
Branch: master

commit 4164de2bdb48eaacc58a70790aadb21b78cbf723
Author: Isaku Yamahata <email address hidden>
Date: Tue Nov 26 16:01:29 2013 +0900

    setup logger name of NeutronCommand automatically

    It is a common pattern to add
    class XXXCommand(NeutronCommand):
        log = logging.getLogger(__name__ + '.<command name>').
    So introduce a metaclass to do that automatically in order to simplify
    the code a bit.

    Closes-Bug: #1258028
    Change-Id: I7908e3e2c0f3f04d9e57360f6ba22e153d0d35bd

Changed in python-neutronclient:
status: In Progress → Fix Committed
Akihiro Motoki (amotoki)
Changed in python-neutronclient:
milestone: none → 2.3.7
Akihiro Motoki (amotoki)
Changed in python-neutronclient:
status: Fix Committed → Fix Released
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.