bancorprotocol / fastlane-bot

Fast Lane, an open-source arbitrage protocol, allows any user to perform arbitrage between Bancor ecosystem protocols and external exchanges and redirect arbitrage profits back to the protocol.
https://github.com/bancorprotocol/fastlane-bot
MIT License
139 stars 58 forks source link

Log uncaught exceptions with full stack trace #289

Open barakman opened 10 months ago

barakman commented 10 months ago

Uncaught exceptions are logged as Error in main loop with little to no information pointing to the source of the problem.

This, in turn, leads to a lot of time and effort being spent on investigating every such exception.

It can be addressed by catching these exceptions at "the main loop", and then logging the entire stack trace.

There are two simple ways for doing this:

  1. By importing sys and then using sys.exc_info()[2]
  2. By importing traceback and then using traceback.format_exc()
barakman commented 10 months ago

Handled in https://github.com/bancorprotocol/fastlane-bot/pull/318