PlaybookExecutor - Python API 2.0

Hey Folks
So while executing playbooks via the PlaybookExecutor API , I want to pass my custom callback derived from CallbackBase + also to get the log file written with an command line like output.

run_pbook = PlaybookExecutor(
playbooks=[playbook], inventory=inventory, loader=loader,
variable_manager=variable_manager, options=options,
passwords=passwords
)
callback = ResultCallback() ----->My custom call back for API responses

run_pbook._tqm._stdout_callback = callback-----------------> this accepts only one stdout call back

So I am wondering how would I achieve my use case of writing an command-line like output to log files

Things tried so far

  1. when using PlaybookExecutor call , the log_path in ansible.cfg does get written to.
  2. I wanted to capture sys.stdout and sys.stderr to lo streaming- but though it captures warnings but not the actual TASK and Play output.

I would really appreciate some help on how I can achieve this .

Regards
VB

***Correction
While executing via PlaybookExecutor log don’t get written to log defined in the ansible.cfg

Tried redirecting stdout and stderr as well - but I don’t get the Task and Play output

Thanks,
Suren VB