I have the following line in my app.py
import logging
from pbiembedservice import PbiEmbedService
logging.basicConfig(level=logging.DEBUG,format='%(asctime)s - %(levelname)s - %(message)s',filename='errors.log',filemode='a')
and in file pbiembedservice.py
class PbiEmbedService:
def RLS_roles(self, workspace_id, report_id, username_id, role_id, additional_dataset_id=None):
report_url = f'https://api.powerbi.com/v1.0/myorg/groups/{workspace_id}/reports/{report_id}'
api_response = requests.get(report_url, headers=self.get_request_header())
#print(api_response.text)
logging.debug(api_response.text)
But when I run the app, it generates the errors.log file but nothing from the logging.debug (api_response.text)
appears and the time also appears incorrect, like two hours less.
On the other hand, with a print I get the api_response
print(api_response.text)
What do I do wrong so that it doesn’t appear in the errors.log file?
Thank you,