INFO app.llm: Invoking model
WARNING app.llm: Approaching rate limit: 3 calls remaining
ERROR app.llm: Calculation failed
Traceback (most recent call last):
File "<workspace-dir>\outputs\01a135da-a9fb-7c92-a410-b2fbde889075\tutorial-draft-2\1\draft-2\K1\examples\17_logging.py", line 28, in <module>
1 / 0
~~^~~
ZeroDivisionError: division by zero
---- JSON Logs (indexable by ELK/Loki and similar systems) ----
{"level": "DEBUG", "logger": "app.llm", "msg": "request_body_size=1234 tokens"}
{"level": "INFO", "logger": "app.llm", "msg": "Invoking model", "request_id": "req-7"}
{"level": "WARNING", "logger": "app.llm", "msg": "Approaching rate limit: 3 calls remaining"}
{"level": "ERROR", "logger": "app.llm", "msg": "Calculation failed", "request_id": "req-8", "exc": "ZeroDivisionError: division by zero"}
INFO app.llm: Using key=sk-ab***
Verification Log: 17_logging.txt
Companion verification log or original code sample for the linked tutorial, preserved in full with local user paths redacted; execution scope follows the recorded run.