< Summary

Information
Class: Orchestrator.LoggingConfiguration<T>
Assembly: Orchestrator
File(s): /home/runner/work/KicktippAi/KicktippAi/src/Orchestrator/LoggingConfiguration.cs
Line coverage
100%
Covered lines: 12
Uncovered lines: 0
Coverable lines: 12
Total lines: 24
Line coverage: 100%
Branch coverage
100%
Covered branches: 4
Total branches: 4
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
CreateLogger<T>()100%22100%

File(s)

/home/runner/work/KicktippAi/KicktippAi/src/Orchestrator/LoggingConfiguration.cs

#LineLine coverage
 1using Microsoft.Extensions.DependencyInjection;
 2using Microsoft.Extensions.Logging;
 3
 4namespace Orchestrator;
 5
 6public static class LoggingConfiguration
 7{
 8    public static ILogger<T> CreateLogger<T>()
 9    {
 110        var serviceCollection = new ServiceCollection();
 111        serviceCollection.AddLogging(builder =>
 112            builder.AddSimpleConsole(options =>
 113            {
 114                options.SingleLine = true;
 115                options.IncludeScopes = false;
 116                options.TimestampFormat = null;
 117                options.ColorBehavior = Microsoft.Extensions.Logging.Console.LoggerColorBehavior.Enabled;
 118            })
 119            .SetMinimumLevel(LogLevel.Information)); // Show info level for .env loading feedback
 20
 121        var serviceProvider = serviceCollection.BuildServiceProvider();
 122        return serviceProvider.GetRequiredService<ILogger<T>>();
 23    }
 24}

Methods/Properties

CreateLogger<T>()