Ansible Logs for Different Host/Client/Server

Hi. I would like to ask if there is a work around in ansible logs.

  1. What i want is that in every server that i manage with ansible, there is a separate log for each of server.
    Ex.
    Ansible Server , Server A, Server B and etc.

When I run a playbook to manage the Server A, Server B I want to have a different log. ServerA.log , ServerB.log.

  1. Basically the Server A, B, C are Database Server. My playbook basically run a sql update to them. If its possible there is a log for each database in each database server.

Ex.
Ansible Server, Server A, Server B.
Server A - Database 1 , Database 2.
Server B - Database 3 , Database 4.

If I run a playbook to run the sql update in Database 3 and Database 4. I want to have a log for each database. Database3.log and Database4.log

Hope someone helps me in this. Thanks.

you can create a callback that does this, look at the syslog_json one for examples.