Skip to content
This repository has been archived by the owner on Oct 27, 2023. It is now read-only.

Add debug logging #12

Merged
merged 1 commit into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/autoblocks-replays.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"

- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v4
with:
Expand Down Expand Up @@ -45,3 +50,6 @@ jobs:
env:
# Dynamic replays are fetched from the Autoblocks API
AUTOBLOCKS_API_KEY: ${{ secrets.DEMO_AUTOBLOCKS_API_KEY }}

- name: Show log file
run: cat flask.log
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ __pycache__/
*.DS_Store

autoblocks-replays/
flask.log
3 changes: 3 additions & 0 deletions demo_replays/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,7 @@ def main():


def start():
import logging

logging.basicConfig(filename="flask.log", level=logging.DEBUG)
app.run(debug=True)
2 changes: 1 addition & 1 deletion demo_replays/replay.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def static():
for trace_id, query in [
("san-francisco-tourist-attractions", "San Francisco tourist attractions"),
("paris-tourist-attractions", "Paris tourist attractions"),
("lombard-stree", "Lombard Street"),
("lombard-street", "Lombard Street"),
("eiffel-tower", "Eiffel Tower"),
]:
print(f"Testing static event {trace_id} - {query}")
Expand Down