Skip to content

Commit

Permalink
add/update logging
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkralidis committed Feb 1, 2024
1 parent d39d073 commit 43be6dd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions msc_wis2node/publisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,10 @@ def publish_to_wis2(self, dataset: str, url: str) -> None:
"""

topic = f"{TOPIC_PREFIX}/{dataset['wis2-topic']}"
LOGGER.info(f'TOPIC: {topic}')
LOGGER.info(f'URL: {url}')

datetime_ = self._topic_regex2datetime(
topic, dataset.get('msc-filename-datetime'))
url, dataset.get('msc-filename-datetime-regex'))

message = create_message(
identifier=str(uuid.uuid4()),
Expand All @@ -180,8 +180,10 @@ def publish_to_wis2(self, dataset: str, url: str) -> None:
tokens = data_id.split('/')
message['properties']['data_id'] = '/'.join(tokens[2:])

LOGGER.debug(json.dumps(message, indent=4))
LOGGER.info('Publishing WIS2 notification message')
LOGGER.info(json.dumps(message, indent=4))
msg = (f'Publishing WIS2 notification message to '
f'host={BROKER_HOSTNAME}, port={BROKER_PORT}, topic={topic}')
LOGGER.info(msg)

publish.single(
topic,
Expand Down

0 comments on commit 43be6dd

Please sign in to comment.