Skip to content

Commit

Permalink
bodsdata.py: Add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Ed (ODSC) committed Feb 21, 2024
1 parent 0fcbc93 commit d8a1720
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions bodsdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
from jsonref import JsonRef
from openpyxl.cell.cell import ILLEGAL_CHARACTERS_RE

from loguru import logger
logger.add("bodsdata_debug.log")

from consistency_checks import ConsistencyChecks

this_path = Path(__file__).parent.absolute()
Expand Down Expand Up @@ -823,6 +826,8 @@ def flatten_iterator():

if object["statementType"] == statement_type + 'Statement':
yield object
if num > 34000000:
logger.debug("{object}")

short_statement_type = statement_type.replace('ownershipOrControl', 'ooc')

Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"markdown",
"datasette",
"humanize",
"rich"
"rich",
"loguru"
]


Expand Down

0 comments on commit d8a1720

Please sign in to comment.