Skip to content

Commit 42d5a9e

Browse files
chore: Run tests with a custom logging configuration for snowflake.conector (#249)
1 parent 755795f commit 42d5a9e

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

Diff for: .github/workflows/test.yml

+5
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
runs-on: ubuntu-latest
3030
env:
3131
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
32+
SINGER_SDK_LOG_CONFIG: ./target_snowflake_logging.yaml
3233
TARGET_SNOWFLAKE_USER: ${{secrets.TARGET_SNOWFLAKE_USER}}
3334
TARGET_SNOWFLAKE_PASSWORD: ${{secrets.TARGET_SNOWFLAKE_PASSWORD}}
3435
TARGET_SNOWFLAKE_ACCOUNT: ${{secrets.TARGET_SNOWFLAKE_ACCOUNT}}
@@ -67,3 +68,7 @@ jobs:
6768
- name: Test with pytest
6869
run: |
6970
poetry run pytest -n auto
71+
- uses: actions/upload-artifact@v4
72+
with:
73+
name: snowflake-logs-py${{ matrix.python-version }}-${{ matrix.os }}
74+
path: snowflake.log

Diff for: target_snowflake_logging.yaml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: 1
2+
disable_existing_loggers: false
3+
formatters:
4+
simple:
5+
format: "{levelname} | {name}| {pathname} | {message}"
6+
style: "{"
7+
handlers:
8+
snowflake:
9+
class: logging.FileHandler
10+
formatter: simple
11+
filename: snowflake.log
12+
loggers:
13+
snowflake.connector:
14+
level: DEBUG
15+
handlers: [ snowflake ]

0 commit comments

Comments
 (0)