Skip to content

Commit

Permalink
More full traceback logs.
Browse files Browse the repository at this point in the history
  • Loading branch information
dowlandaiello committed Jul 24, 2024
1 parent e83e396 commit 8d11789
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/strategies/bellman_ford.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Implements an arbitrage strategy based on bellman ford.
"""

import traceback
import random
import logging
from decimal import Decimal
Expand Down Expand Up @@ -329,8 +330,10 @@ async def strategy(
r.status = Status.EXECUTED

ctx.log_route(r, "info", "Executed route successfully: %s", [fmt_route(route)])
except Exception as e:
ctx.log_route(r, "error", "Arb failed %s: %s", [fmt_route(route), e])
except Exception:
ctx.log_route(
r, "error", "Arb failed %s: %s", [fmt_route(route), traceback.format_exc()]
)

r.status = Status.FAILED
finally:
Expand Down

0 comments on commit 8d11789

Please sign in to comment.