Skip to content

Commit

Permalink
add logging to core utils file
Browse files Browse the repository at this point in the history
  • Loading branch information
claire-peters committed Dec 12, 2024
1 parent d823c87 commit 5375950
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion coldfront/core/utils/fasrc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"""
import os
import json
import logging
import operator
from functools import reduce
from datetime import datetime
Expand All @@ -15,6 +16,7 @@
from coldfront.core.project.models import Project
from coldfront.core.resource.models import Resource

logger = logging.getLogger(__name__)

MISSING_DATA_DIR = './local_data/missing/'

Expand Down Expand Up @@ -74,7 +76,7 @@ def select_one_project_allocation(project_obj, resource_obj, dirpath):
return allocations[0]
elif len(allocations) > 1:
print(allocations)
logger.exception('multiple allocations found for project/resource/path pairing: %s', allocations)
logger.exception('multiple allocations found for project/resource/path pairing: %s %s', allocations, allocations[0].path)
raise Exception('multiple allocations found for project/resource/path pairing')

def determine_size_fmt(byte_num):
Expand Down

0 comments on commit 5375950

Please sign in to comment.