• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

DemoBytom / DemoEngine / 24967157351

26 Apr 2026 09:11PM UTC coverage: 28.482% (+0.2%) from 28.251%
24967157351

push

coveralls.net

DemoBytom
Add OpenTelemetry to engine

1225 of 4301 relevant lines covered (28.48%)

0.32 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Demo.Engine.Platform.Windows/LoggingExtensions.cs
1
// Copyright © Michał Dembski and contributors.
2
// Distributed under MIT license. See LICENSE file in the root for more information.
3

4
using Microsoft.Extensions.Logging;
5

6
namespace Demo.Engine.Platform.Windows;
7

8
internal static partial class LoggingExtensions
9
{
10
    private const string ERROR_IN_MESSAGE_LOOP_PROCESSING_WINDOWS_MESSAGES = "An error occured in message loop while processing windows messages. Error: {ErrorCode}";
11
    private const string EXCEPTION_IN_MESSAGE_LOOP_PROCESSING_WINDOWS_MESSAGES = "An exception occured in message loop while processing windows messages. Exception message: {ExceptionMessage}";
12
    private const string EXCEPTION_DISPOSING_WINDOWS_MESSAGE_PUMP = "An exception occured while disposing WindowsMessagePump.";
13

14
    [LoggerMessage(
15
        Level = LogLevel.Error,
16
        Message = ERROR_IN_MESSAGE_LOOP_PROCESSING_WINDOWS_MESSAGES,
17
        SkipEnabledCheck = true)]
18
    private static partial void LogErroInMainLoopProcessingWindowsMessages(
19
        this ILogger<WindowsMessagePump> logger,
20
        int errorCode);
21

22
    internal static void LogErroInMainLoopProcessingWindowsMessages(
23
        this ILogger<WindowsMessagePump> logger,
24
        Func<int> errorCodeAction)
25
    {
26
        if (logger.IsEnabled(LogLevel.Error))
×
27
        {
28
            logger.LogErroInMainLoopProcessingWindowsMessages(
×
29
                errorCodeAction());
×
30
        }
31
    }
×
32

33
    [LoggerMessage(
34
        Level = LogLevel.Error,
35
        Message = EXCEPTION_IN_MESSAGE_LOOP_PROCESSING_WINDOWS_MESSAGES,
36
        SkipEnabledCheck = true)]
37
    private static partial void LogExceptionInMessageLoopProcessingWindowsMessages(
38
        this ILogger<WindowsMessagePump> logger,
39
        Exception exception,
40
        string exceptionMessage);
41

42
    internal static void LogExceptionInMessageLoopProcessingWindowsMessages(
43
        this ILogger<WindowsMessagePump> logger,
44
        Exception exception)
45
    {
46
        if (logger.IsEnabled(LogLevel.Error))
×
47
        {
48
            logger.LogExceptionInMessageLoopProcessingWindowsMessages(
×
49
                exception,
×
50
                exception.Message);
×
51
        }
52
    }
×
53

54
    [LoggerMessage(
55
        Level = LogLevel.Error,
56
        Message = EXCEPTION_DISPOSING_WINDOWS_MESSAGE_PUMP,
57
        SkipEnabledCheck = true)]
58
    public static partial void LogExceptionDisposingWindowsMessagePump(
59
        this ILogger<WindowsMessagePump> logger,
60
        Exception exception);
61

62
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc