Skip to content

Add WithContext() integration tests for MEL logger#709

Merged
Aaronontheweb merged 2 commits into
akkadotnet:devfrom
Aaronontheweb:feature/withcontext-support
Feb 10, 2026
Merged

Add WithContext() integration tests for MEL logger#709
Aaronontheweb merged 2 commits into
akkadotnet:devfrom
Aaronontheweb:feature/withcontext-support

Conversation

@Aaronontheweb
Copy link
Copy Markdown
Member

Summary

  • Added WithContextSpecs integration tests validating that context properties set via the core WithContext() API flow through to Microsoft.Extensions.Logging state dictionaries via TryGetProperties()
  • No code changes needed - LoggerFactoryLogger already calls TryGetProperties()

Dependencies

Depends on akkadotnet/akka.net#8042 (logging context scopes). CI will fail until the new Akka.NET packages are published.

Test plan

  • WithContext_SingleProperty_AppearsInMelState - validated locally
  • WithContext_MultipleProperties_AllAppearInState - validated locally
  • WithContext_CombinedWithSemanticTemplate_BothAppearInState - validated locally
  • WithContext_DoesNotPolluteUnrelatedLogs - validated locally
  • Full regression (133/133 pass, 1 skip) - validated locally against 1.5.60-beta packages

Validates that context properties set via the core WithContext() API
flow through to Microsoft.Extensions.Logging state dictionaries via
TryGetProperties().

Depends on akkadotnet/akka.net#8042
Update Akka.NET dependency to 1.5.60 which includes the WithContext() logging context enrichment feature.
@Aaronontheweb Aaronontheweb marked this pull request as ready for review February 10, 2026 02:14
@Aaronontheweb Aaronontheweb merged commit 1bbf9d3 into akkadotnet:dev Feb 10, 2026
2 checks passed
This was referenced May 21, 2026
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.

1 participant