-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
You can disable logging at all for Kernel Memory by setting the logging minimum level of its Microsoft.KernelMemory.Diagnostics.DefaultLogger.Factory = LoggerFactory.Create(builder =>
{
builder.SetMinimumLevel(LogLevel.None);
}); If you don't have to disable all the logging, you can use the |
Beta Was this translation helpful? Give feedback.
-
With memory builder you can use this: var builder = new KernelMemoryBuilder()
.Configure(builder => builder.Services.AddLogging(l =>
{
l.SetMinimumLevel(LogLevel.None);
}))
... or this, if you want to see errors: var builder = new KernelMemoryBuilder()
.Configure(builder => builder.Services.AddLogging(l =>
{
l.SetMinimumLevel(LogLevel.Error);
l.AddSimpleConsole(c =>
{
c.SingleLine = true;
c.UseUtcTimestamp = false;
c.TimestampFormat = "[HH:mm:ss.fff] ";
});
}))
... You could also log to file, see here for example https://learn.microsoft.com/en-us/answers/questions/1377949/logging-in-c-to-a-text-file As @marcominerva mentioned, you can configure a lot of other options. |
Beta Was this translation helpful? Give feedback.
With memory builder you can use this:
or this, if you want to see errors: