nextAnalytics / services /logtail_setup.py
honey234's picture
updated backend
d1fa8b0
raw
history blame contribute delete
491 Bytes
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()