Skip to content

Commit

Permalink
chore: Run tests with a custom logging configuration for `snowflake.c…
Browse files Browse the repository at this point in the history
…onector` (#249)
  • Loading branch information
edgarrmondragon authored Aug 29, 2024
1 parent 755795f commit 42d5a9e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
SINGER_SDK_LOG_CONFIG: ./target_snowflake_logging.yaml
TARGET_SNOWFLAKE_USER: ${{secrets.TARGET_SNOWFLAKE_USER}}
TARGET_SNOWFLAKE_PASSWORD: ${{secrets.TARGET_SNOWFLAKE_PASSWORD}}
TARGET_SNOWFLAKE_ACCOUNT: ${{secrets.TARGET_SNOWFLAKE_ACCOUNT}}
Expand Down Expand Up @@ -67,3 +68,7 @@ jobs:
- name: Test with pytest
run: |
poetry run pytest -n auto
- uses: actions/upload-artifact@v4
with:
name: snowflake-logs-py${{ matrix.python-version }}-${{ matrix.os }}
path: snowflake.log
15 changes: 15 additions & 0 deletions target_snowflake_logging.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 1
disable_existing_loggers: false
formatters:
simple:
format: "{levelname} | {name}| {pathname} | {message}"
style: "{"
handlers:
snowflake:
class: logging.FileHandler
formatter: simple
filename: snowflake.log
loggers:
snowflake.connector:
level: DEBUG
handlers: [ snowflake ]

0 comments on commit 42d5a9e

Please sign in to comment.