I would want to get the stdout of the python file into shell script. I initially used print and it worked fine but it is not working for logging.
ab.py
import logging
logger = logging.getLogger()
logging.basicConfig(level=logging.INFO)
logging.info('2222222222222')
print("111111111111")
cd.sh
#/bin/bash
set -e
set -x
communities=$(python3 ab.py)
echo $communities
The output of executing cd.sh I am getting the output only as 111111111111 and not 2222222222222