移除无用的依赖。
This commit is contained in:
parent
1d3524f595
commit
e895e086cb
|
@ -10,8 +10,6 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="JetBrains.Annotations" Version="2023.3.0" />
|
<PackageReference Include="JetBrains.Annotations" Version="2023.3.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.0-preview.6.24327.7" />
|
|
||||||
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.9.0" />
|
|
||||||
<PackageReference Include="YamlDotNet" Version="15.1.6" />
|
<PackageReference Include="YamlDotNet" Version="15.1.6" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
|
@ -4,9 +4,6 @@ using System.Text;
|
||||||
using ColdMint.scripts.openObserve;
|
using ColdMint.scripts.openObserve;
|
||||||
using ColdMint.scripts.utils;
|
using ColdMint.scripts.utils;
|
||||||
using Godot;
|
using Godot;
|
||||||
using Microsoft.Extensions.Logging;
|
|
||||||
using OpenTelemetry.Exporter;
|
|
||||||
using OpenTelemetry.Logs;
|
|
||||||
|
|
||||||
namespace ColdMint.scripts.debug;
|
namespace ColdMint.scripts.debug;
|
||||||
|
|
||||||
|
@ -125,25 +122,6 @@ public static class LogCat
|
||||||
private static HashSet<string> DisabledLogLabels { get; } = [];
|
private static HashSet<string> DisabledLogLabels { get; } = [];
|
||||||
|
|
||||||
|
|
||||||
public static void Init()
|
|
||||||
{
|
|
||||||
var loggerFactory = LoggerFactory.Create(builder =>
|
|
||||||
{
|
|
||||||
builder.AddOpenTelemetry(options => { options.AddOtlpExporter(OtlpExporterOptions); });
|
|
||||||
});
|
|
||||||
var logger = loggerFactory.CreateLogger("323");
|
|
||||||
logger.Log(LogLevel.Debug, "你好");
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void OtlpExporterOptions(OtlpExporterOptions options)
|
|
||||||
{
|
|
||||||
options.Protocol = OtlpExportProtocol.HttpProtobuf;
|
|
||||||
options.Endpoint = new Uri("http://test.coldmint.top/api/default/traces");
|
|
||||||
options.Headers =
|
|
||||||
"Authorization=Basic cm9vdEBleGFtcGxlLmNvbTp5V0kwVzZYcWhteTBzQml3,organization=default,stream-name=default";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>Disable log Label</para>
|
/// <para>Disable log Label</para>
|
||||||
/// <para>禁用某个日志标签</para>
|
/// <para>禁用某个日志标签</para>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user