Skip to content

Commit

Permalink
Updated logging mechanism
Browse files Browse the repository at this point in the history
  • Loading branch information
dwest77a committed Nov 20, 2024
1 parent 645eaba commit 58f997b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions facet_scanner/collection_handlers/utils/facet_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@
import os
from typing import Optional, Tuple
from facet_scanner.collection_handlers.base import CollectionHandler
import logging

from facet_scanner import logstream

logger = logging.getLogger(__name__)
logger.addHandler(logstream)
logger.propagate = False

class FacetFactory:
"""
Expand Down Expand Up @@ -56,6 +62,7 @@ def get_handler(self, path: str) -> Tuple[Optional[CollectionHandler], Optional[
:rtype: CollectionHandler, str
"""

logger.debug('Locating collection details')
collection_details, collection_path = self.get_collection_map(path)
if collection_details is not None:
return locate(collection_details['handler']), collection_path
Expand Down
7 changes: 7 additions & 0 deletions facet_scanner/collection_handlers/utils/moles_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@
from json.decoder import JSONDecodeError
from requests.exceptions import Timeout
import json
import logging

from facet_scanner import logstream

logger = logging.getLogger(__name__)
logger.addHandler(logstream)
logger.propagate = False

MOLES_MAPPING_FILE = os.environ.get('MOLES_MAPPING_FILE')

Expand Down

0 comments on commit 58f997b

Please sign in to comment.