< Summary

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

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
CreateLogger<T>()0%620%

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    {
 010        var serviceCollection = new ServiceCollection();
 011        serviceCollection.AddLogging(builder =>
 012            builder.AddSimpleConsole(options =>
 013            {
 014                options.SingleLine = true;
 015                options.IncludeScopes = false;
 016                options.TimestampFormat = null;
 017                options.ColorBehavior = Microsoft.Extensions.Logging.Console.LoggerColorBehavior.Enabled;
 018            })
 019            .SetMinimumLevel(LogLevel.Information)); // Show info level for .env loading feedback
 20
 021        var serviceProvider = serviceCollection.BuildServiceProvider();
 022        return serviceProvider.GetRequiredService<ILogger<T>>();
 23    }
 24}

Methods/Properties

CreateLogger<T>()