def setup_logging(
    file_name='logging.json', 
    default_level=logging.INFO,
):
    """
        Setup logging configuration
    """

    current_dir =  os.path.abspath(os.path.dirname(__file__))
    
    file_path = current_dir + '/' + file_name 

    if os.path.exists(file_path):
        with open(file_path, 'rt') as f:
            data = f.read()
            config = json.loads(data)
        logging.config.dictConfig(config)
    else:
        logging.basicConfig(level=default_level)

    #stop logs from requests
    requests_log = logging.getLogger("requests")
    requests_log.setLevel(logging.WARNING)
Setup logging configuration