Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/docs/customization-extensibility/logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ By default, TUnit will intercept any logs to the `Console`, and attempt to corre
So for most scenarios, you can just rely on `Console.WriteLine(...)`.

## Logger Objects
If you want a logger object, you can call `TestContext.GetDefaultLogger()`, which will give you a logger that will write output to that test's output writer.
If you want a logger object, you can call `TestContext.Current.GetDefaultLogger()`, which will give you a logger that will write output to that test's output writer.

This logger can also be used to map to other logging interfaces (e.g. Microsoft.Extensions.Logging), so that for example, Asp.NET web apps can log to your test's context, so that you have a cleaner, more isolated log output.

Expand Down