Skip to content

Commit

Permalink
Fix kernel logger clock setup
Browse files Browse the repository at this point in the history
  • Loading branch information
cjdsellers committed Mar 11, 2023
1 parent 67faa81 commit 298a921
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nautilus_trader/system/kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,10 @@ def __init__( # noqa (too complex)
f"environment {environment} not recognized", # pragma: no cover (design-time error)
)

# Setup the logger with a `LiveClock` initially,
# which is later swapped out for a `TestClock` in the `BacktestEngine`.
self._logger = Logger(
clock=self._clock,
clock=self._clock if isinstance(self._clock, LiveClock) else LiveClock(),
trader_id=self._trader_id,
machine_id=self._machine_id,
instance_id=self._instance_id,
Expand Down

0 comments on commit 298a921

Please sign in to comment.