Skip to content

Commit

Permalink
feat(taps): Make stream logger a child of the tap logger (meltano#1854)
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon authored Nov 14, 2023
1 parent b83457b commit d04d39c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion singer_sdk/sinks/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def __init__(
schema: Schema of the stream to sink.
key_properties: Primary key of the stream to sink.
"""
self.logger = target.logger
self.logger = target.logger.getChild(stream_name)
self.sync_started_at = target.initialized_at
self._config = dict(target.config)
self._pending_batch: dict | None = None
Expand Down
2 changes: 1 addition & 1 deletion singer_sdk/streams/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def __init__(
msg = "Missing argument or class variable 'name'."
raise ValueError(msg)

self.logger: logging.Logger = tap.logger
self.logger: logging.Logger = tap.logger.getChild(self.name)
self.metrics_logger = tap.metrics_logger
self.tap_name: str = tap.name
self._config: dict = dict(tap.config)
Expand Down

0 comments on commit d04d39c

Please sign in to comment.