Skip to content

Commit 183adea

Browse files
authored
chore: Added XUnitLoggerOptions.Minimal preset (#24)
* chore: Added `XUnitLoggerOptions.Minimal` preset * fix: Added missing ; * chore: Extended tests
1 parent f0e611e commit 183adea

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/NetEvolve.Logging.XUnit/XUnitLoggerOptions.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,17 @@ public class XUnitLoggerOptions : IXUnitLoggerOptions
3535
DisableTimestamp = false
3636
};
3737

38+
/// <summary>
39+
/// Minimal options, which disables the category name, additional information, scopes and timestamp in the log output.
40+
/// </summary>
41+
public static XUnitLoggerOptions Minimal { get; } =
42+
new XUnitLoggerOptions
43+
{
44+
DisableAdditionalInformation = true,
45+
DisableScopes = true,
46+
DisableTimestamp = true
47+
};
48+
3849
/// <inheritdoc cref="IXUnitLoggerOptions.DisableAdditionalInformation"/>
3950
public bool DisableAdditionalInformation { get; set; }
4051

tests/NetEvolve.Logging.XUnit.Tests.Integration/XUnitLoggerExtensionsTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ public void AddXUnit_TestCase2_Expected()
6363
null,
6464
XUnitLoggerOptions.Default,
6565
XUnitLoggerOptions.EnableAllFeatures,
66-
XUnitLoggerOptions.DisableAllFeatures
66+
XUnitLoggerOptions.DisableAllFeatures,
67+
XUnitLoggerOptions.Minimal
6768
};
6869

6970
#pragma warning disable CA1812 // Avoid uninstantiated internal classes

0 commit comments

Comments
 (0)