Change in vdsm[master]: hooks: ovs: start every log with 'OVS: '

ibarkan at redhat.com ibarkan at redhat.com
Sun Oct 11 07:40:17 UTC 2015


Ido Barkan has posted comments on this change.

Change subject: hooks: ovs: start every log with 'OVS: '
......................................................................


Patch Set 5: Code-Review-1

(1 comment)

https://gerrit.ovirt.org/#/c/46906/5/vdsm_hooks/ovs/ovs_utils.py
File vdsm_hooks/ovs/ovs_utils.py:

Line 145:             initial_config.networks, initial_config.bonds,
Line 146:             {'connectivityCheck': False, '_inRollback': True})
Line 147: 
Line 148: 
Line 149: def log(message):
this is not the 'standard' api of using hooking.log and future users might still use hooking.log (and not get the prefix).
I just found out now that hooking.py is using sys.stderr.write(message + '\n').
So, you could just alter hooking,log with your own version at the beginning of the hook:
def log(message):
    sys.stderr.write('OVS: %s' % message + '\n')
hooking.log = log

and then no further changes will be needed.


-- 
To view, visit https://gerrit.ovirt.org/46906
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I477954f0cb18071bf80caa88e241cfabdde6bbe9
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček <phoracek at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Ido Barkan <ibarkan at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Ondřej Svoboda <osvoboda at redhat.com>
Gerrit-Reviewer: Petr Horáček <phoracek at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list