Skip to content

Commit 9cc7afd

Browse files
Copilotcgillum
andcommitted
Consolidate LoggingOptions docs and remove useless test
Co-authored-by: cgillum <[email protected]>
1 parent 498c904 commit 9cc7afd

File tree

2 files changed

+20
-38
lines changed

2 files changed

+20
-38
lines changed

src/Worker/Core/DurableTaskWorkerOptions.cs

Lines changed: 20 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -246,44 +246,39 @@ public class VersioningOptions
246246
}
247247

248248
/// <summary>
249-
/// Options for the Durable Task worker logging.
249+
/// Options for configuring Durable Task worker logging behavior.
250250
/// </summary>
251-
/// <remarks>
252-
/// <para>
253-
/// These options control how logging categories are assigned to different components of the worker.
254-
/// Starting from a future version, more specific logging categories will be used for better log filtering:
255-
/// <list type="bullet">
256-
/// <item><description><c>Microsoft.DurableTask.Worker.Grpc</c> for gRPC worker logs (previously <c>Microsoft.DurableTask</c>)</description></item>
257-
/// <item><description><c>Microsoft.DurableTask.Worker.*</c> for worker-specific logs</description></item>
258-
/// </list>
259-
/// </para><para>
260-
/// To maintain backward compatibility, legacy logging categories are emitted by default alongside the new
261-
/// categories until a future major release. This ensures existing log filters continue to work.
262-
/// </para><para>
263-
/// <b>Migration Path:</b>
264-
/// <list type="number">
265-
/// <item><description>Update your log filters to use the new, more specific categories</description></item>
266-
/// <item><description>Test your application to ensure logs are captured correctly</description></item>
267-
/// <item><description>Once confident, set <see cref="UseLegacyCategories" /> to <c>false</c> to disable legacy category emission</description></item>
268-
/// </list>
269-
/// </para>
270-
/// </remarks>
271251
public class LoggingOptions
272252
{
273253
/// <summary>
274254
/// Gets or sets a value indicating whether to emit logs using legacy logging categories in addition to new categories.
275255
/// </summary>
276256
/// <remarks>
277257
/// <para>
258+
/// Starting from a future version, more specific logging categories will be used for better log filtering:
259+
/// <list type="bullet">
260+
/// <item><description><c>Microsoft.DurableTask.Worker.Grpc</c> for gRPC worker logs (previously <c>Microsoft.DurableTask</c>)</description></item>
261+
/// <item><description><c>Microsoft.DurableTask.Worker.*</c> for worker-specific logs</description></item>
262+
/// </list>
263+
/// </para>
264+
/// <para>
278265
/// When <c>true</c> (default), logs are emitted to both the new specific categories (e.g., <c>Microsoft.DurableTask.Worker.Grpc</c>)
279266
/// and the legacy broad categories (e.g., <c>Microsoft.DurableTask</c>). This ensures backward compatibility with existing
280267
/// log filters and queries.
281-
/// </para><para>
268+
/// </para>
269+
/// <para>
282270
/// When <c>false</c>, logs are only emitted to the new specific categories, which provides better log organization
283271
/// and filtering capabilities.
284-
/// </para><para>
285-
/// <b>Default:</b> <c>true</c> (legacy categories are enabled for backward compatibility)
286-
/// </para><para>
272+
/// </para>
273+
/// <para>
274+
/// <b>Migration Path:</b>
275+
/// <list type="number">
276+
/// <item><description>Update your log filters to use the new, more specific categories</description></item>
277+
/// <item><description>Test your application to ensure logs are captured correctly</description></item>
278+
/// <item><description>Once confident, set this property to <c>false</c> to disable legacy category emission</description></item>
279+
/// </list>
280+
/// </para>
281+
/// <para>
287282
/// <b>Breaking Change Warning:</b> Setting this to <c>false</c> is a breaking change if you have existing log filters,
288283
/// queries, or monitoring rules that depend on the legacy category names. Ensure you update those before disabling
289284
/// legacy categories.

test/Worker/Grpc.Tests/LoggingCategoryTests.cs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,6 @@ public void Worker_UsesLegacyCategories_ByDefault()
3232
workerOptions.Logging.UseLegacyCategories.Should().BeTrue("backward compatibility should be enabled by default");
3333
}
3434

35-
[Fact]
36-
public void Worker_CanDisableLegacyCategories()
37-
{
38-
// Arrange
39-
var workerOptions = new DurableTaskWorkerOptions
40-
{
41-
Logging = { UseLegacyCategories = false }
42-
};
43-
44-
// Act & Assert
45-
workerOptions.Logging.UseLegacyCategories.Should().BeFalse("legacy categories can be explicitly disabled");
46-
}
47-
4835
[Fact]
4936
public void DualCategoryLogger_LogsToBothLoggers_WhenBothEnabled()
5037
{

0 commit comments

Comments
 (0)