Dan Kenigsberg has submitted this change and it was merged.

Change subject: api: Use warnings to report schema inconsistencies
......................................................................


api: Use warnings to report schema inconsistencies

Previously we spammed the log with warnings about conflicts between the
schema and the real usage of the apis. These warnings are useful for
developers but have negative value for users.

Now we use warnings.warn instead of logging.warning, so they do not
appear in the log by default. To enable warnings in the log, change the
configuration:

    [devel]
    python_warnings_enable = true

When enabled, the warnings are little more verbose now, using Python
standard warning style:

    jsonrpc.Executor/2::WARNING::2016-06-01
    22:23:55,551::vdsmapi::148::py.warnings::(_report_inconsistency)
    /usr/lib/python2.7/site-packages/api/vdsmapi.py:148: Inconsistency: No
    default value specified for systemProductName parameter in
    Host.getHardwareInfo
      warnings.warn(message, Inconsistency)

Change-Id: I5077d77b3b0e18edafa5f85073feb39cb87448cb
Signed-off-by: Nir Soffer <[email protected]>
Reviewed-on: https://gerrit.ovirt.org/58494
Continuous-Integration: Jenkins CI
Reviewed-by: Piotr Kliczewski <[email protected]>
---
M lib/api/vdsmapi.py
1 file changed, 6 insertions(+), 1 deletion(-)

Approvals:
  Piotr Kliczewski: Looks good to me, approved
  Nir Soffer: Verified
  Jenkins CI: Passed CI tests



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5077d77b3b0e18edafa5f85073feb39cb87448cb
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <[email protected]>
Gerrit-Reviewer: Adam Litke <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Francesco Romani <[email protected]>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: Piotr Kliczewski <[email protected]>
Gerrit-Reviewer: gerrit-hooks <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/admin/lists/[email protected]

Reply via email to