Updated
This commit is contained in:
@@ -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.
|
||||||
|
|||||||
Reference in New Issue
Block a user