UGS log level

Hi folks, is there a way to change the logging level in UGS? I’ve tried editing the code in Logging.CreateLoggerProvider by adding a call to “.MinimumLevel.Verbose()” (more as an experiment), it’s not working, and during the rest of execution, every logger still has “Information” as its minimum level. Trying to understand the logging system is is a larger learning experience than I thought it was going to be, so after a decent amount of time spent trying to understand on my own, I thought I’d ask here.

For reference, here’s what the function "CreateLoggerProvider currently looks like localy afer my experiemental edits:

`public static ILoggerProvider CreateLoggerProvider(FileReference file)
{
ExpressionTemplate et = new ExpressionTemplate(“[{[Content removed]16} {Indent}{@m}{@x}\n”);

Serilog.ILogger logger = new LoggerConfiguration()
.MinimumLevel.Verbose() // ADDED THIS
.Enrich.FromLogContext()
.WriteTo.File(et, file.FullName, rollingInterval: RollingInterval.Day, rollOnFileSizeLimit: true, fileSizeLimitBytes: 20 * 1024 * 1024, retainedFileCountLimit: 5)
.CreateLogger();

return new Serilog.Extensions.Logging.SerilogLoggerProvider(logger, true);
}`

Hey there,

Yes there is - unfortunately the code can be a bit wonky to follow due to some mismatch of dependency injection.

In program.cs, add this:

// Create a new logger using (ILoggerProvider loggerProvider = Logging.CreateLoggerProvider(FileReference.Combine(dataFolder, "UnrealGameSync.log"))) { ServiceCollection services = new ServiceCollection(); // JULIAN_DIVERGENCE_START services.AddLogging(builder => { builder.SetMinimumLevel(LogLevel.Debug); builder.AddProvider(loggerProvider); }); // JULIAN_DIVERGENCE_END //.... }This is necessary because the aforementioned logger configuration you’ve specified is for the Serilog, which doesn’t appear to be added into the Logger pipeline properly. The above should get you through in the interim.

Kind regards,

Julian

Great thank you Julian