File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 11import asyncio
2+ import logging
3+ import traceback
24
35import dotenv
46
79from observer .message import Message , MessageLevel
810from observer .observer import log_message , observer_loop
911
12+ LOGGER = logging .getLogger ()
13+
1014
1115def main (config : Configuration ):
1216 try :
1317 asyncio .run (observer_loop (config ))
1418 except Exception as e :
15- mb = Message .builder ()
16- message = mb .build (MessageLevel .CRITICAL , (f"Observer crashed. Reason: { e } " ))
19+ mb = Message .builder ().add (network = config .chain_id )
20+ message = mb .build (
21+ MessageLevel .CRITICAL ,
22+ (f"observer crashed (traceback in logs) - { e } " ),
23+ )
1724 log_message (config , message )
25+ LOGGER .exception (e )
26+ LOGGER .error (traceback .format_exc ())
1827
1928
2029if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments