-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat: Add native semantic logging support with property extraction #7933
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Aaronontheweb
merged 19 commits into
akkadotnet:dev
from
Aaronontheweb:feature/semantic-logging
Nov 24, 2025
+2,298
−9
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
6cdceec
feat: Add native semantic logging support to Akka.NET core
Aaronontheweb 9d10594
perf: optimize semantic logging memory allocations (75% reduction)
Aaronontheweb f9a2d2c
Enable SemanticLogMessageFormatter as default logger formatter
Aaronontheweb 69c15e5
feat: Add EventFilter support for semantic logging templates
Aaronontheweb 9efe15a
test: Add semantic logging integration tests for log filtering
Aaronontheweb e973213
fix: Update ConfigurationSpec to expect SemanticLogMessageFormatter a…
Aaronontheweb 3173d24
fix: enable nullable reference types in LogEventExtensions
Aaronontheweb 2a52c6f
test: Add semantic logging edge cases verification test
Aaronontheweb 8a4c843
Update API Approval list
Arkatufus 8befe09
Merge branch 'feature/semantic-logging' of github.com:Aaronontheweb/a…
Arkatufus 1c58a6b
Add new edge case unit tests (failing)
Arkatufus 8e0015f
docs: Add Message Templates spec reference to SemanticLogMessageForma…
Aaronontheweb 66899c4
fix: Correct escaped brace handling in semantic logging per Message T…
Aaronontheweb c03463b
Merge branch 'dev' into feature/semantic-logging
Aaronontheweb 5d64aa2
fix: Use culture-independent format specifiers in verify test
Aaronontheweb 9b73de9
test: Add escaped brace benchmarks and .NET Framework verified file
Aaronontheweb 6cc8b1f
Add unit tests
Arkatufus 800c319
fix: Implement alignment specifiers and null ToString() handling in S…
Aaronontheweb 66bd3d3
Merge branch 'dev' into feature/semantic-logging
Arkatufus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
534 changes: 534 additions & 0 deletions
534
src/benchmark/Akka.Benchmarks/Logging/SemanticLoggingBenchmarks.cs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...PI.Tests/verify/DefaultLogFormatSpec.ShouldHandleSemanticLogEdgeCases.DotNet.verified.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| [DEBUG][DateTime][Thread 0001][ActorSystem(test)] User 12345 logged in from 192.168.1.1 | ||
| [INFO][DateTime][Thread 0001][ActorSystem(test)] Processing order ORD-001 for customer CUST-999 | ||
| [WARNING][DateTime][Thread 0001][ActorSystem(test)] Processing item 5 of 10 | ||
| [INFO][DateTime][Thread 0001][ActorSystem(test)] Order total is $123.45 with 3 items | ||
| [DEBUG][DateTime][Thread 0001][ActorSystem(test)] Empty template | ||
| [INFO][DateTime][Thread 0001][ActorSystem(test)] Single property 42 | ||
| [WARNING][DateTime][Thread 0001][ActorSystem(test)] Null value: {NullValue} | ||
| [ERROR][DateTime][Thread 0001][ActorSystem(test)] Exception occurred for user 999 | ||
| [DEBUG][DateTime][Thread 0001][ActorSystem(test)] Path: C:\temp\file.txt, Size: 1024 bytes | ||
| [INFO][DateTime][Thread 0001][ActorSystem(test)] User john.doe is active: True, joined on 2024-01-15 | ||
| [DEBUG][DateTime][Thread 0001][ActorSystem(test)] Request from 192.168.1.100:54321 to endpoint /api/v1/users took 250ms |
11 changes: 11 additions & 0 deletions
11
...a.API.Tests/verify/DefaultLogFormatSpec.ShouldHandleSemanticLogEdgeCases.Net.verified.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| [DEBUG][DateTime][Thread 0001][ActorSystem(test)] User 12345 logged in from 192.168.1.1 | ||
| [INFO][DateTime][Thread 0001][ActorSystem(test)] Processing order ORD-001 for customer CUST-999 | ||
| [WARNING][DateTime][Thread 0001][ActorSystem(test)] Processing item 5 of 10 | ||
| [INFO][DateTime][Thread 0001][ActorSystem(test)] Order total is $123.45 with 3 items | ||
| [DEBUG][DateTime][Thread 0001][ActorSystem(test)] Empty template | ||
| [INFO][DateTime][Thread 0001][ActorSystem(test)] Single property 42 | ||
| [WARNING][DateTime][Thread 0001][ActorSystem(test)] Null value: {NullValue} | ||
| [ERROR][DateTime][Thread 0001][ActorSystem(test)] Exception occurred for user 999 | ||
| [DEBUG][DateTime][Thread 0001][ActorSystem(test)] Path: C:\temp\file.txt, Size: 1024 bytes | ||
| [INFO][DateTime][Thread 0001][ActorSystem(test)] User john.doe is active: True, joined on 2024-01-15 | ||
| [DEBUG][DateTime][Thread 0001][ActorSystem(test)] Request from 192.168.1.100:54321 to endpoint /api/v1/users took 250ms |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,7 +50,7 @@ public void The_default_configuration_file_contain_all_configuration_properties( | |
| settings.LogDeadLetters.ShouldBe(10); | ||
| settings.LogDeadLettersDuringShutdown.ShouldBeFalse(); | ||
| settings.LogDeadLettersSuspendDuration.ShouldBe(TimeSpan.FromMinutes(5)); | ||
| settings.LogFormatter.Should().BeOfType<DefaultLogMessageFormatter>(); | ||
| settings.LogFormatter.Should().BeOfType<SemanticLogMessageFormatter>(); | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we now use the semantic log message formatter by default |
||
|
|
||
| settings.ProviderClass.ShouldBe(typeof (LocalActorRefProvider).FullName); | ||
| settings.SupervisorStrategyClass.ShouldBe(typeof (DefaultSupervisorStrategy).FullName); | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Big battery of benchmarks that covers:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, validates that we haven't significantly impacted the performance of our old
string.Formatcalls either