Skip to content

Use source generators for logging and regular expressions#1652

Merged
bart-vmware merged 5 commits intomainfrom
logger-regex-source-generators
Mar 2, 2026
Merged

Use source generators for logging and regular expressions#1652
bart-vmware merged 5 commits intomainfrom
logger-regex-source-generators

Conversation

@bart-vmware
Copy link
Member

@bart-vmware bart-vmware commented Feb 26, 2026

Description

This PR updates logging and regular expressions to use the source generators provided by the .NET runtime.

  • Log messages are cleaner now, but this PR does not change their levels nor the locations where logging happens.
  • Optimized the flags provided to regular expressions.

Additionally, I updated the Sonar analyzer because new violations were only reported in Cloud (which always uses the latest version). This was caused by false-negative fixes in existing rules; no new rules were added. Also, updated R# to the latest version.

Reviewing per commit is recommended.

Closes #970 #969.

Quality checklist

  • Your code complies with our Coding Style.
  • You've updated unit and/or integration tests for your change, where applicable.
  • You've updated documentation for your change, where applicable.
    If your change affects other repositories, such as Documentation, Samples and/or MainSite, add linked PRs here.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.
  • You've added required license files and/or file headers (explaining where the code came from with proper attribution), where code is copied from StackOverflow, a blog, or OSS.

@bart-vmware bart-vmware changed the title Logger regex source generators Use source generators for logging and regular expressions Feb 26, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 26, 2026

Summary - All Code Coverage (ubuntu-latest)

Line coverage Branch coverage

Assembly Line coverage Branch coverage
Steeltoe.Bootstrap.AutoConfiguration 97.4% 100%
Steeltoe.Common 84.3% 77.8%
Steeltoe.Common.Certificates 96.2% 85.5%
Steeltoe.Common.Hosting 84% 70%
Steeltoe.Common.Http 100% 85.2%
Steeltoe.Common.Logging 81.1% 56.2%
Steeltoe.Common.Net 64.5% 66.6%
Steeltoe.Configuration.Abstractions 98.6% 91.4%
Steeltoe.Configuration.CloudFoundry 99.1% 91.8%
Steeltoe.Configuration.ConfigServer 97.2% 91.6%
Steeltoe.Configuration.Encryption 97.6% 92.4%
Steeltoe.Configuration.Kubernetes.ServiceBindings 95.1% 89.3%
Steeltoe.Configuration.Placeholder 93.8% 84.7%
Steeltoe.Configuration.RandomValue 93.2% 90%
Steeltoe.Configuration.SpringBoot 98.3% 95%
Steeltoe.Connectors 93.9% 89.4%
Steeltoe.Connectors.EntityFrameworkCore 81.5% 75%
Steeltoe.Discovery.Configuration 92.3% 100%
Steeltoe.Discovery.Consul 97.6% 96.5%
Steeltoe.Discovery.Eureka 91.9% 84.8%
Steeltoe.Discovery.HttpClients 94.2% 95.4%
Steeltoe.Logging.Abstractions 99.4% 96.9%
Steeltoe.Logging.DynamicConsole 100% 95.4%
Steeltoe.Logging.DynamicSerilog 99.1% 95.4%
Steeltoe.Management.Abstractions 100% 100%
Steeltoe.Management.Endpoint 95.7% 88.9%
Steeltoe.Management.Prometheus 95.8% 91.6%
Steeltoe.Management.Tasks 100% ****
Steeltoe.Management.Tracing 100% 75%
Steeltoe.Security.Authentication.JwtBearer 100% 100%
Steeltoe.Security.Authentication.OpenIdConnect 73.8% 59%
Steeltoe.Security.Authorization.Certificate 96.7% 75%
Steeltoe.Security.DataProtection.Redis 100% ****

@bart-vmware bart-vmware marked this pull request as ready for review February 26, 2026 13:31
@bart-vmware bart-vmware requested a review from TimHess February 26, 2026 13:31
@bart-vmware bart-vmware requested a review from TimHess February 27, 2026 14:36
@bart-vmware bart-vmware requested a review from TimHess February 27, 2026 15:01
@sonarqubecloud
Copy link

@bart-vmware bart-vmware merged commit ccd55f6 into main Mar 2, 2026
25 checks passed
@bart-vmware bart-vmware deleted the logger-regex-source-generators branch March 2, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants