Spaces:
Runtime error
Runtime error
File size: 491 Bytes
d1fa8b0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | import bugsnag
from reddit.load_env import bugsnag_token
class CustomLogger:
def __init__(self):
bugsnag.configure(
api_key=bugsnag_token,
project_root="../",
)
def log(self, message: str):
try:
bugsnag.notify(Exception('Error'),
context=message,
)
except Exception as e:
bugsnag.notify(Exception('Self-Error'),
context=e,
)
app_logger = CustomLogger() |