Skip to content

Commit

Permalink
Fix logger usage
Browse files Browse the repository at this point in the history
  • Loading branch information
chandra-tacc committed Nov 1, 2023
1 parent b6e2a6e commit cc228d4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def api_imaging():
api_date = datetime.now().strftime(datetime_format)
imaging_data = get_api_imaging_data(tapis_token)
if imaging_data:
app.logger_info(f"Caching imaging report data. Date: {api_date}")
app.logger.info(f"Caching imaging report data. Date: {api_date}")
api_data_cache['imaging'] = imaging_data
api_data_index['imaging'] = api_date
return jsonify({'date': api_data_index['imaging'], 'data': api_data_cache['imaging']})
Expand All @@ -176,7 +176,7 @@ def api_consort():
api_date = datetime.now().strftime(datetime_format)
consort_data_json = get_api_consort_data(tapis_token)
if consort_data_json:
app.logger_info(f"Caching consort report data. Date: {api_date}")
app.logger.info(f"Caching consort report data. Date: {api_date}")
api_data_cache['consort'] = consort_data_json
api_data_index['consort'] = api_date
return jsonify({'date': api_data_index['consort'], 'data': api_data_cache['consort']})
Expand All @@ -196,7 +196,7 @@ def api_blood():
api_date = datetime.now().strftime(datetime_format)
blood_data, blood_data_request_status = get_api_blood_data(tapis_token)
if blood_data:
app.logger_info(f"Caching blood api response data. Date: {api_date}")
app.logger.info(f"Caching blood api response data. Date: {api_date}")
api_data_index['blood'] = api_date
api_data_cache['blood'] = blood_data

Expand Down Expand Up @@ -227,7 +227,7 @@ def api_subjects():
if latest_subjects_json:
# latest_data = create_clean_subjects(latest_subjects_json, screening_sites, display_terms_dict, display_terms_dict_multi)
latest_data = process_subjects_data(latest_subjects_json,subjects_raw_cols_for_reports,screening_sites, display_terms_dict, display_terms_dict_multi)
app.logger_info(f"Caching subjects api response data. Date: {api_date}")
app.logger.info(f"Caching subjects api response data. Date: {api_date}")
api_data_cache['subjects'] = latest_data
api_data_index['subjects'] = api_date

Expand Down

0 comments on commit cc228d4

Please sign in to comment.