Skip to content

Commit b5147f6

Browse files
committed
fix: keep the log handler set by the brokerage test project
- only swap Lean's default ConsoleLogHandler for NUnitLogHandler - brokerage test projects keep their file log for the whole run
1 parent cd52034 commit b5147f6

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Tests/Brokerages/BrokerageTests.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ public abstract class BrokerageTests
5050
[SetUp]
5151
public void Setup()
5252
{
53-
Log.LogHandler = new NUnitLogHandler();
53+
// keep the log handler set by the test project, only replace Lean's default
54+
if (Log.LogHandler is ConsoleLogHandler)
55+
{
56+
Log.LogHandler = new NUnitLogHandler();
57+
}
5458

5559
Log.Trace("");
5660
Log.Trace("");

0 commit comments

Comments
 (0)