genai-rss-space / logger.py
8shanrahan's picture
Create logger.py
2a948e9 verified
raw
history blame
298 Bytes
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>"