Spaces:
Runtime error
Runtime error
| 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() |