This commit is contained in:
2026-06-16 09:59:56 +02:00
parent f99e17e838
commit 3134ffba17
+13
View File
@@ -37,6 +37,7 @@ public sealed class LogBuilder
public LogBuilder(string category = "Application") public LogBuilder(string category = "Application")
{ {
_category = category ?? throw new ArgumentNullException(nameof(category)); _category = category ?? throw new ArgumentNullException(nameof(category));
UseAsyncPipeline();
} }
/// <summary> /// <summary>
@@ -1107,6 +1108,18 @@ public sealed class LogBuilder
return this; return this;
} }
/// <summary>
/// Disables the async dispatch pipeline and uses a synchronous flow instead.
/// </summary>
/// <param name="capacity"></param>
/// <returns></returns>
public LogBuilder UseSyncPipeline(int capacity = 65536)
{
_useAsyncPipeline = false;
_asyncPipelineCapacity = capacity;
return this;
}
/// <summary> /// <summary>
/// Attaches a <see cref="DynamicLevelController"/> so the minimum log level can /// Attaches a <see cref="DynamicLevelController"/> so the minimum log level can
/// be changed at runtime without restarting the application. /// be changed at runtime without restarting the application.