Updated
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Net.Http.Json" Version="10.0.9" />
|
||||
<PackageReference Include="System.Net.Http.Json" Version="10.0.10" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\EonaCat.LogStack\EonaCat.LogStack.csproj" />
|
||||
|
||||
@@ -32,10 +32,10 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="OpenTelemetry" Version="1.16.0" />
|
||||
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.16.0" />
|
||||
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.16.0" />
|
||||
<PackageReference Include="System.Threading.AccessControl" Version="10.0.9" />
|
||||
<PackageReference Include="OpenTelemetry" Version="1.17.0" />
|
||||
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.17.0" />
|
||||
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.17.0" />
|
||||
<PackageReference Include="System.Threading.AccessControl" Version="10.0.10" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.9" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.9">
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.10" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.10">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Diagnostics.EventLog" Version="10.0.9" />
|
||||
<PackageReference Include="System.Threading.AccessControl" Version="10.0.9" />
|
||||
<PackageReference Include="System.Diagnostics.EventLog" Version="10.0.10" />
|
||||
<PackageReference Include="System.Threading.AccessControl" Version="10.0.10" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -14,7 +14,7 @@ It features a rich fluent API for routing log events to dozens of destinations f
|
||||
<Copyright>EonaCat (Jeroen Saey)</Copyright>
|
||||
<PackageTags>EonaCat;Logger;EonaCatLogStack;Log;Writer;Flows;LogStack;Memory;Speed;Jeroen;Saey</PackageTags>
|
||||
<PackageIconUrl />
|
||||
<FileVersion>0.1.7</FileVersion>
|
||||
<FileVersion>0.1.8</FileVersion>
|
||||
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
<PackageLicenseFile>LICENSE</PackageLicenseFile>
|
||||
@@ -25,7 +25,7 @@ It features a rich fluent API for routing log events to dozens of destinations f
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<EVRevisionFormat>0.1.7+{chash:10}.{c:ymd}</EVRevisionFormat>
|
||||
<EVRevisionFormat>0.1.8+{chash:10}.{c:ymd}</EVRevisionFormat>
|
||||
<EVDefault>true</EVDefault>
|
||||
<EVInfo>true</EVInfo>
|
||||
<EVTagMatch>v[0-9]*</EVTagMatch>
|
||||
@@ -36,7 +36,7 @@ It features a rich fluent API for routing log events to dozens of destinations f
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<Version>0.1.7</Version>
|
||||
<Version>0.1.8</Version>
|
||||
<PackageId>EonaCat.LogStack</PackageId>
|
||||
<Product>EonaCat.LogStack</Product>
|
||||
<RepositoryUrl>https://git.saey.me/EonaCat/EonaCat.LogStack</RepositoryUrl>
|
||||
@@ -85,19 +85,19 @@ It features a rich fluent API for routing log events to dozens of destinations f
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="EonaCat.Json" Version="2.2.4" />
|
||||
<PackageReference Include="EonaCat.Versioning" Version="1.5.8">
|
||||
<PackageReference Include="EonaCat.Json" Version="2.2.5" />
|
||||
<PackageReference Include="EonaCat.Versioning" Version="1.6.4">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="EonaCat.Versioning.Helpers" Version="1.5.1" />
|
||||
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.9" />
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.9" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="10.0.9" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="10.0.9" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.10" />
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.10" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="10.0.10" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="10.0.10" />
|
||||
<PackageReference Include="System.Net.Http" Version="4.3.4" />
|
||||
<PackageReference Include="System.Threading.Channels" Version="10.0.9" />
|
||||
<PackageReference Include="System.Threading.Channels" Version="10.0.10" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -718,25 +718,53 @@ namespace EonaCat.LogStack
|
||||
// Drain and stop the async channel pipeline if active
|
||||
if (_asyncChannel != null)
|
||||
{
|
||||
// Flush all logs from flows first to ensure they're written to disk
|
||||
await FlushAsync().ConfigureAwait(false);
|
||||
|
||||
// Complete the channel - no more writes allowed
|
||||
_asyncChannel.Writer.TryComplete();
|
||||
|
||||
if (_asyncConsumer != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
// Wait for the consumer task to finish draining the channel
|
||||
// Use a generous timeout (30 seconds) since we're dealing with legitimate I/O
|
||||
// but prevent infinite hangs if something is truly deadlocked
|
||||
using (var cts = new CancellationTokenSource(TimeSpan.FromSeconds(30)))
|
||||
{
|
||||
try
|
||||
{
|
||||
await _asyncConsumer.ConfigureAwait(false);
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
// Do nothing
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine(ex);
|
||||
// Do nothing
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
// If using synchronous mode, just flush
|
||||
await FlushAsync().ConfigureAwait(false);
|
||||
}
|
||||
|
||||
var disposeTasks = _concurrentFlows.Select(f => f.DisposeAsync().AsTask());
|
||||
// Dispose flows - they should already be flushed above
|
||||
var disposeTasks = _concurrentFlows.Select(f => f.DisposeAsync().AsTask()).ToArray();
|
||||
try
|
||||
{
|
||||
await Task.WhenAll(disposeTasks).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
_asyncCts?.Dispose();
|
||||
GC.SuppressFinalize(this);
|
||||
|
||||
@@ -70,7 +70,6 @@ public static class MemoryOptimizations
|
||||
public static void TryCompact()
|
||||
{
|
||||
GC.Collect(GC.MaxGeneration, GCCollectionMode.Optimized, false);
|
||||
GC.WaitForPendingFinalizers();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="EonaCat.Versioning" Version="1.5.8">
|
||||
<PackageReference Include="EonaCat.Versioning" Version="1.6.4">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
|
||||
Reference in New Issue
Block a user