- Update Akka.NET to 1.5.69
- Update Akka.Hosting to 1.5.69
- Fix incorrect WithLogging API reference in docs (should be ConfigureLoggers)
- Update Akka.NET to 1.5.60
- Add WithContext() support and deprecate Serilog-specific ForContext()
- Convert tests from deprecated APIs to WithContext() and fix flaky net471 tests
This release adds support for Akka.NET 1.5.60's built-in WithContext() logging context enrichment API. Context properties set via WithContext() on any ILoggingAdapter now automatically flow through to Serilog as structured properties.
Deprecations:
SerilogLoggingAdapterclass is now marked[Obsolete]- use the standardILoggingAdapterwithWithContext()insteadForContext()extension method is now marked[Obsolete]- useWithContext()instead
These deprecated APIs still work and will continue to work — they just produce compiler warnings. They will not be removed until a future major version.
What's NOT Changing:
Your existing Serilog configuration is completely unaffected. This deprecation only affects how you create logging adapters inside Akka.NET actor code — it does not change anything about the Serilog pipeline itself.
Specifically, all of the following continue to work exactly as before:
- Your Serilog
LoggerConfiguration— whether configured via C# code,appsettings.json, or any other Serilog configuration provider - Global enrichers —
FromLogContext(),WithMachineName(),WithProcessId(),WithThreadId(), and any customILogEventEnricherimplementations - Global properties — static properties added via
Enrich.WithProperty()or the"Properties"section in JSON config - Output templates —
{ActorPath},{LogSource},{Thread}, and all other Akka metadata properties are still emitted exactly as before - Sinks — Console, Seq, Elasticsearch, file sinks, and all other Serilog sinks are unaffected
LogContext.PushProperty()— Serilog's ambient context API works the same as always- Serilog's native
ILogger.ForContext()— this is Serilog's own API and is NOT deprecated; only the Akka-specificForContext()extension method onILoggingAdapteris deprecated PropertyEnricherparameters — passingPropertyEnricherobjects as log message parameters still works- Level switches and minimum level overrides — no changes to log level filtering behavior
Migration:
// Old (deprecated - produces compiler warning, but still works)
var log = Context.GetLogger<SerilogLoggingAdapter>()
.ForContext("TenantId", "TENANT-001");
// New (recommended)
var log = Context.GetLogger()
.WithContext("TenantId", "TENANT-001");The new WithContext() API is part of core Akka.NET and works identically across all logging backends (Serilog, NLog, Microsoft.Extensions.Logging).
- Update Akka.NET to 1.5.58
- Update Akka.Hosting to 1.5.58
- Add Akka.Hosting extensions for Serilog
- Add LogFilter integration support
This release adds Akka.Hosting integration and LogFilter support for Serilog.
New Features:
- Akka.Hosting Extensions: New
AddSerilogLogging()extension method forLoggerConfigBuilderthat simplifies Serilog setup with Akka.Hosting. Automatically configuresSerilogLoggerand enablesSerilogLogMessageFormatterfor semantic logging. - LogFilter Integration: Serilog now properly integrates with Akka.NET's LogFilter API for source-based log filtering, enabling pre-pipeline filtering for improved performance.
Usage Example:
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddAkka("MyActorSystem", configurationBuilder =>
{
configurationBuilder.ConfigureLoggers(loggerConfigBuilder =>
{
loggerConfigBuilder.AddSerilogLogging();
});
});This release adds full semantic logging support, enabling Serilog to receive properly structured message templates and parameters instead of pre-formatted strings. This enhancement leverages Akka.NET's semantic logging APIs introduced in version 1.5.56, enabling richer structured logging capabilities.
New Features:
- Semantic Logging: Serilog now receives message templates with named and positional parameters for true structured logging
- Enhanced Template Support: Full support for Serilog destructuring (
@), stringification ($), and format specifiers (e.g.,:N2) - ForContext Integration: Semantic logging works seamlessly with
ForContext()for enriched log contexts - Akka Metadata Preservation: All Akka.NET metadata (timestamp, log level, thread, logger name) is preserved in structured logs
- Backwards Compatible: Fully compatible with older Akka.NET versions through
LogMessagetype checking
- Update Akka.Hosting to 1.5.25
- implicitly convert regular
BusLoggertoSerilogLoggingAdapterwhenForContextis called
As of Akka.Logger.Serilog v1.5.25, you can now do the following:
var log = Context.GetLogger()
.ForContext("Address", "No. 4 Privet Drive")
.ForContext("Town", "Little Whinging")
.ForContext("County", "Surrey")
.ForContext("Country", "England");
log.Info("My boss makes me use {Semantic} logging", "semantic");And it will work without having to explicitly call Context.GetLogger<SerilogLoggingAdapter>() first.