diff --git a/EonaCat.LogStack/LogBuilder.cs b/EonaCat.LogStack/LogBuilder.cs index e62a3c0..69b4587 100644 --- a/EonaCat.LogStack/LogBuilder.cs +++ b/EonaCat.LogStack/LogBuilder.cs @@ -37,6 +37,7 @@ public sealed class LogBuilder public LogBuilder(string category = "Application") { _category = category ?? throw new ArgumentNullException(nameof(category)); + UseAsyncPipeline(); } /// @@ -1107,6 +1108,18 @@ public sealed class LogBuilder return this; } + /// + /// Disables the async dispatch pipeline and uses a synchronous flow instead. + /// + /// + /// + public LogBuilder UseSyncPipeline(int capacity = 65536) + { + _useAsyncPipeline = false; + _asyncPipelineCapacity = capacity; + return this; + } + /// /// Attaches a so the minimum log level can /// be changed at runtime without restarting the application.