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

Commit

Permalink
Add debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicole White committed Aug 17, 2023
1 parent 9896e2b commit 38037aa
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 1 deletion.
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
5 changes: 5 additions & 0 deletions flask.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
WARNING:werkzeug: * Debugger is active!
INFO:werkzeug: * Debugger PIN: 513-118-593
INFO:werkzeug: * Detected change in '/Users/nicole/autoblocks/demo-replays/demo_replays/app.py', reloading
WARNING:werkzeug: * Debugger is active!
INFO:werkzeug: * Debugger PIN: 513-118-593

0 comments on commit 38037aa

Please sign in to comment.