Add ILogger and OTEL
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
using Godot;
|
||||
using System.Reflection;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using SharpIDE.Application.Features.Analysis;
|
||||
using SharpIDE.Application.Features.Build;
|
||||
using SharpIDE.Application.Features.FilePersistence;
|
||||
@@ -33,6 +35,16 @@ public partial class DiAutoload : Node
|
||||
services.AddScoped<RoslynAnalysis>();
|
||||
services.AddScoped<IdeFileOperationsService>();
|
||||
services.AddScoped<SharpIdeSolutionModificationService>();
|
||||
services.AddLogging(builder =>
|
||||
{
|
||||
builder.AddConsole();
|
||||
builder.AddOpenTelemetry(logging =>
|
||||
{
|
||||
logging.IncludeFormattedMessage = true;
|
||||
logging.IncludeScopes = true;
|
||||
});
|
||||
});
|
||||
services.AddGodotOpenTelemetry();
|
||||
|
||||
_serviceProvider = services.BuildServiceProvider();
|
||||
GetTree().NodeAdded += OnNodeAdded;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
<ProjectReference Include="..\SharpIDE.Application\SharpIDE.Application.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" />
|
||||
<PackageReference Include="ObservableCollections" />
|
||||
<PackageReference Include="ObservableCollections.R3" />
|
||||
<PackageReference Include="R3" />
|
||||
|
||||
Reference in New Issue
Block a user