Skip to content

Commit

Permalink
should resolve remaining logger formatting issues on #228
Browse files Browse the repository at this point in the history
  • Loading branch information
biblicabeebli committed Jan 16, 2024
1 parent 18bcf89 commit 1dc532b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions forest/willow/log_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ def log_stats_main(
# the corresponding frequency.
for beiwe_id in beiwe_ids:
for freq in frequencies:
logger.info(f"({freq.name.lower()}) Participant: {beiwe_id}")
logger.info("(%s) Participant: %s", freq.name.lower(), beiwe_id)
try:
log_stats_inner(
beiwe_id,
Expand All @@ -469,7 +469,7 @@ def log_stats_main(
time_end
)
except Exception as err:
logger.error(f"An error occurred when processing data: {err}")
logger.error("An error occurred when processing data: %s", err)

logger.info("Summary statistics obtained. Finished.")

Expand All @@ -494,7 +494,7 @@ def log_stats_inner(

# give up early if there is no data
if text_data.shape[0] <= 0 and call_data.shape[0] <= 0:
logger.info(f"There was no data for participant {beiwe_id}")
logger.info("There was no data for participant %s", beiwe_id)
return

# stamps from call and text should be the stamp_end
Expand Down Expand Up @@ -524,7 +524,7 @@ def log_stats_inner(
"Error: "
"num_uniq_individuals_call_or_text was found to be less than "
"%s for at least one time interval. This error comes from an "
"issue with the code, not an issue with the input data." %
"issue with the code, not an issue with the input data.",
column
)

Expand Down

0 comments on commit 1dc532b

Please sign in to comment.