Skip to content

Commit 2d0e82a

Browse files
fix: Customize logging with direct logging module calls instead of a logging configuration file (#346)
1 parent 80ed206 commit 2d0e82a

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ target-version = "py39"
4141
[tool.ruff.lint]
4242
ignore = [
4343
"ANN201",
44+
"COM812",
4445
"TD",
4546
"D",
4647
"FIX",

target_snowflake/default_logging.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

target_snowflake/target.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,23 @@
22

33
from __future__ import annotations
44

5+
import logging.config
6+
57
import click
68
from singer_sdk import typing as th
79
from singer_sdk.target_base import SQLTarget
810

911
from target_snowflake.initializer import initializer
1012
from target_snowflake.sinks import SnowflakeSink
1113

14+
logging.config.dictConfig(
15+
{
16+
"version": 1,
17+
"disable_existing_loggers": False,
18+
"loggers": {"snowflake.connector": {"level": "WARNING"}},
19+
},
20+
)
21+
1222

1323
class TargetSnowflake(SQLTarget):
1424
"""Target for Snowflake."""

0 commit comments

Comments
 (0)