Spaces:
Sleeping
Sleeping
| import traceback | |
| def debug_log(label, value=None): | |
| print(f"[DEBUG] {label}") | |
| if value is not None: | |
| print(value) | |
| def log_exception(context=""): | |
| tb = traceback.format_exc() | |
| print(f"[ERROR] Exception during {context}:\n{tb}") | |
| return f"<pre>[{context} ERROR]\n{tb}</pre>" | |