Skip to content

Commit

Permalink
more logging tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
liquidsec committed Oct 23, 2024
1 parent d2da64b commit 2b2f9ab
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/distro_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ jobs:
poetry env use python3.11
poetry install
poetry run pytest --reruns 2 -o timeout_func_only=true --timeout 1200 --disable-warnings --log-cli-level=DEBUG .
poetry run pytest --reruns 2 -o timeout_func_only=true --timeout 1200 --disable-warnings --log-cli-level=INFO --log-level=DEBUG --log-capture-level=INFO --log-file=pytest_debug.log --show-capture=no .
poetry run pytest --reruns 2 -o timeout_func_only=true --timeout 1200 --disable-warnings --log-cli-level=INFO --log-level=DEBUG --log-file=pytest_debug.log --show-capture=no .
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
poetry install
- name: Run tests
run: |
poetry run pytest --exitfirst --reruns 2 -o timeout_func_only=true --timeout 1200 --disable-warnings --log-cli-level=INFO --log-capture-level=INFO --log-level=DEBUG --log-file=pytest_debug.log --show-capture=no --cov-config=bbot/test/coverage.cfg --cov-report xml:cov.xml --cov=bbot .
poetry run pytest --exitfirst --reruns 2 -o timeout_func_only=true --timeout 1200 --disable-warnings --log-cli-level=INFO --log-level=DEBUG --log-file=pytest_debug.log --show-capture=no --cov-config=bbot/test/coverage.cfg --cov-report xml:cov.xml --cov=bbot .
- name: Upload Debug Logs
uses: actions/upload-artifact@v3
with:
Expand Down
4 changes: 4 additions & 0 deletions bbot/test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
for h in root_logger.handlers:
h.addFilter(lambda x: x.levelname not in ("STDOUT", "TRACE"))

console_handler = logging.StreamHandler()
console_handler.setLevel(logging.INFO) # Prevent DEBUG logs from going to console
root_logger.addHandler(console_handler)

CORE.merge_default(test_config)


Expand Down

0 comments on commit 2b2f9ab

Please sign in to comment.