Ansible Python API 2.0 - capture warnings

Hello All
Been circling around the Callbackbase with all possible tries , but I could not find a way till now to capture these warnings from a playbook execution with the API output

[WARNING]: * Failed to parse hosts/UAT/ dictionary, got: <class ‘ansible.parsing.yaml.objects.AnsibleUnicode’>

[WARNING]: * Failed to parse /hosts/UAT/ssh_keys/dbrun_46186_1_uat with ini plugin:: Expected key=value host variable assignment, got: RSA

[WARNING]: Could not match supplied host pattern, ignoring: primary_host

Appreciate some help - on how to capture these warning messages when we run playbooks via the API?

Warnings are not currently handled by callbacks, the Display class handles them.

Thanks for the prompt response Brian

Any examples or references on how to integrate the display with playbook executor callbacks ?

Appreciate your response

Thanks,
Suren VB

Hey Brain
Appreciate some pointers here

Thanks,
Suren VB

Hey Guys
Badly need some pointers here - as I am running out of options

Fiddling with the display Utils gives me the needed verbose but to stdout and not the callbacks

Thanks,
Suren VB