dylan
09/12/2025, 4:39 AMdylan
09/12/2025, 4:39 AMtap-internal I'm using self.logger in the stream to log http headers of the request being made. I set the log level to error here for testing purposes:
@property
@t.override
def http_headers(self) -> dict:
headers = super().http_headers | {"X-App-Version": API_VERSION}
self.logger.error("Headers: %s", headers)
return headers
I was expecting the log level in the output below to match the log level above, but after some testing now it seems to somehow always be set to `INFO`:
2025-09-12T03:42:40.844990Z [info ] Headers: {'User-Agent': 'tap-internal/1.0.0', 'X-App-Version': '4.8.3'} cmd_type=elb consumer=False job_name=production:tap-internal-to-target-bigquery name=tap-internal producer=True run_id=6eb25352-c688-4207-baae-ebf3eaa1bf72 stdio=stderr string_id=tap-internal
When I tried some simple log formatting through a singer-sdk-logging.yaml file I saw the original log level inside the log message, but the "outer" log level is still `INFO`:
2025-09-12T04:17:36.972935Z [info ] [89788|MainThread|tap-internal.charges] [ERROR] Headers: {'User-Agent': 'tap-internal/1.0.0', 'X-App-Version': '4.8.3'} cmd_type=elb consumer=False job_name=production:tap-internal-to-target-bigquery name=tap-internal producer=True run_id=9a93b982-b5db-41dd-8154-5d22c27b2f05 stdio=stderr string_id=tap-internal
Using Meltano 3.7.8 with the default logging settings (i.e. no logging.yaml or logging-specific envs set).
If anyone knows what I am doing to cause this behavior, I'd appreciate the help!Reuben (Matatika)
09/12/2025, 11:38 AMinfo. Maybe it's possible to fix, but I'm not that familiar with logging interoperability to say for sure.