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

ParadoxGameConverters / Fronter.NET / 17702925212

13 Sep 2025 10:36PM UTC coverage: 19.079% (+0.9%) from 18.155%
17702925212

Pull #905

github

web-flow
Merge bd0393206 into edd5b18e7
Pull Request #905: Optimize the slicing of log messages from converter backends

99 of 708 branches covered (13.98%)

Branch coverage included in aggregate %.

52 of 79 new or added lines in 5 files covered. (65.82%)

1 existing line in 1 file now uncovered.

572 of 2809 relevant lines covered (20.36%)

9.12 hits per line

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

0.0
/Fronter.NET/ValueConverters/LogLevelToColorNameConverter.cs
1
using Avalonia.Data.Converters;
2
using Avalonia.Media;
3
using log4net.Core;
4
using System;
5

6
namespace Fronter.ValueConverters;
7

8
// based on https://stackoverflow.com/a/5551986/10249243
9
internal sealed class LogLevelToColorNameConverter : IValueConverter {
10
        public object Convert(object? value, Type targetType, object? parameter, System.Globalization.CultureInfo culture) {
×
NEW
11
                if (value is not Level input) {
×
NEW
12
                        return Brushes.Transparent;
×
13
                }
14
                // Tried to order this by expected frequency for better performance.
NEW
15
                return input.Name switch {
×
NEW
16
                        "DEBUG" => Brushes.SlateGray,
×
NEW
17
                        "INFO" => Brushes.Transparent,
×
18
                        "PROGRESS" => Brushes.ForestGreen,
×
NEW
19
                        "WARN" => Brushes.Orange,
×
20
                        "NOTICE" => Brushes.CornflowerBlue,
×
21
                        "ERROR" => Brushes.IndianRed,
×
NEW
22
                        "FATAL" => Brushes.DarkRed,
×
23
                        "WARNING" => Brushes.Orange,
×
NEW
24
                        "CRITICAL" => Brushes.Red,
×
NEW
25
                        _ => Brushes.Transparent,
×
26
                };
×
27
        }
×
28

29
        public object ConvertBack(object? value, Type targetType, object? parameter, System.Globalization.CultureInfo culture) {
×
30
                throw new NotSupportedException();
×
31
        }
32
}
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