< Summary

Information
Class: Cff.Effect.Logging.Logging
Assembly: Cff.Effect.Logging
File(s): /home/runner/work/Cff.Effect/Cff.Effect/src/Cff.Effect.Logging/Logging.cs
Tag: 43_3213223096
Line coverage
69%
Covered lines: 9
Uncovered lines: 4
Coverable lines: 13
Total lines: 25
Line coverage: 69.2%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Method coverage is only available for sponsors.

Upgrade to PRO version

Coverage History

Metrics

MethodBranch coverage Cyclomatic complexity Line coverage
get_Logger()100%1100%
Info(...)100%1100%
Error(...)100%10%
Error(...)100%1100%

File(s)

/home/runner/work/Cff.Effect/Cff.Effect/src/Cff.Effect.Logging/Logging.cs

#LineLine coverage
 1using Cff.Effect.Abstractions;
 2using Microsoft.Extensions.Logging;
 3
 4namespace Cff.Effect.Logging;
 5
 46internal readonly record struct Logging(ILogger Logger) : ILogging
 7{
 8    public Unit Info(string message, params object?[] args)
 19    {
 110        Logger.LogInformation(message, args);
 111        return unit;
 112    }
 13
 14    public Unit Error(Exception ex, string message, params object?[] args)
 015    {
 016        Logger.LogError(ex, message, args);
 017        return unit;
 018    }
 19
 20    public Unit Error(Error ex, string message, params object?[] args)
 121    {
 122        Logger.LogError(ex.Exception.Match(x => x, new Exception(ex.Message)), message, args);
 123        return unit;
 124    }
 25}