diff --git a/singer_sdk/sinks/core.py b/singer_sdk/sinks/core.py index e578c2084..ec4664f67 100644 --- a/singer_sdk/sinks/core.py +++ b/singer_sdk/sinks/core.py @@ -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 diff --git a/singer_sdk/streams/core.py b/singer_sdk/streams/core.py index 4c3adb225..9463b2f3f 100644 --- a/singer_sdk/streams/core.py +++ b/singer_sdk/streams/core.py @@ -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)