You can’t always log all the sub-processes as they are created, since they can in turn create new processes that you are not aware of. However, it’s pretty simple to use psutil to find them:
import psutil
current_process = psutil.Process()
children = current_process.children(recursive=True)
for child in children:
print('Child pid is {}'.format(child.pid))