Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Oct 29, 2025

Updated Serilog from 3.0.0 to 4.2.0.

Release notes

Sourced from Serilog's releases.

4.2.0

What's Changed

  • #​2141 — stabilize and fully implement dotted identifiers in message templates (@​nblumhardt)
  • #​2028 — use RuntimeHelpers.GetHashCode() in message template cache comparer (@​sungam3r)
  • #​2138 — update to .NET 9 SDK, GitHub Actions build, net9.0 TFM (@​nblumhardt)
  • #​2132 — support capturing of multidimensional arrays (@​sungam3r, @​WAcry)
  • #​2136 — fix documentation for ILogEventSink (@​erichiller)

New Contributors

Full Changelog: serilog/serilog@v4.1.0...v4.2.0

4.1.0

  • #​2108 - failure listeners and fallback sinks (@​nblumhardt)
  • #​2120 - add BatchingOptions.RetryTimeLimit and update retry scheduling algorithm (@​nblumhardt)

Important note

IBatchedLogEventSink batch retry scheduling has changed in this version. The default configuration still tries failed batches for approximately ten minutes, but the BufferingTimeLimit no longer implicitly causes the retry time to be extended or reduced. If you need a specific retry time, set BatchingOptions.RetryTimeLimit, which reliably controls retry time.

4.0.2

  • #​2094 - remove boxing and string allocations in output template formatting (@​epeshk)
  • #​2103 - don't capture properties with private get accessors (@​nblumhardt)
  • #​2095 - remove junk file (@​Numpsy)
  • #​2116 - fall back to IDisposable in Log.CloseAndFlushAsync() when the target logger is not IAsyncDisposable (@​nblumhardt)

4.0.1

  • #​2090 — when capturing structured values, reuse HashSet instances, reduce LINQ usage, avoid reallocating string[] to improve performance and cut GC pressure (@​nblumhardt)
  • #​2089 - allow capturing of non-anonymous structured values when trimming (@​nblumhardt)
  • #​2083 - use Major.Minor.0.0 assembly versioning (@​nblumhardt)

4.0.0

What's new in Serilog 4.0.0?

If you're deploying to .NET Framework, note that Serilog's assembly version number has been unpinned from the long-running historical 2.0.0 default, and now matches the package version precisely. If you encounter issues, ensure your build is generating valid assembly binding redirects.

Simple, robust, built-in batching support

Sinks that need batching functionality can now be easily written, without any additional package dependencies, by implementing IBatchedLogEventSink:

class MyBatchedSink: IBatchedLogEventSink
{
    public Task EmitBatchAsync(IReadOnlyCollection<LogEvent> batch)
    {
        // Send a batch of log events...
    }
}

Batched sinks can be added using WriteTo.Sink(IBatchedLogEventSink, ...) - they're given first-class consideration just like regular un-batched sinks.

The built-in batching implementation is based on System.Threading.Channels and draws on the original Serilog.Sinks.PeriodicBatching package (now in maintenance-mode), to provide a full-featured, efficient, async-native batching implementation.

Experimental dotted name capturing

By setting an experimental AppContext switch, message templates can be used to capture dotted names, which are required when using some logging schemas.

AppContext.SetSwitch("Serilog.Parsing.MessageTemplateParser.AcceptDottedPropertyNames", true);

Log.Information("Running as {user.name}", Environment.UserName);
// Captures {"user.name": "nblumhardt"}

While currently experimental and unsupported, this flag is intended to help the ecosystem evaluate and prepare for dotted name support in a future Serilog release.

Changes

  • #​2015 — breaking unpin assembly version (@​nblumhardt)
  • #​2045 — breaking use case-insensitive matching for level overrides (@​tillig)
  • #​2051 — breaking recognize UtcTimestamp as a built-in token in output templates (@​MatthewHays)
  • #​1979 — add tests for ReusableStringWriter (@​nblumhardt)
  • #​2016 — update TFMs (@​nblumhardt, @​bartelink)
  • #​2018 — add LogEvent.UnstableAssembleFromParts() (@​nblumhardt)
  • #​2044 — build updates for compatibility (@​tillig)
  • #​2027 — improve trimming annotations, compatibility switch for compiler-generated type support (@​agocke)
  • #​2055 — introduce IBatchedLogEventSink and WriteTo.Sink(IBatchedLogEventSink) (@​nblumhardt)
  • #​2060 — introduce LoggerSinkConfiguration.CreateSink() and redesign .Wrap() (@​nblumhardt, @​bartelink)
  • #​2063 — improve MessageTemplateParser performance, switch to allow . in captured property names (@​nblumhardt)
  • #​2064 — make message template alignment parsing match spec (@​Insomniak47)
  • #​2065 — allow any character except } in message template format specifiers (@​Insomniak47)
    ... (truncated)

3.1.1

  • #​1977 - don't stack overflow when disposing ReusableStringWriter with large renderings (@​nblumhardt)

This is a bugfix for release 3.1.0.

3.1.0

  • #​1935 - remove CHANGES.md (@​sungam3r)
  • #​1936, #​1922 - README.md updates (@​nblumhardt)
  • #​1942 - remove redundant GetTypeInfo() calls (@​SimonCropp)
  • #​1947 - message template caching performance improvements (@​epeshk)
  • #​1948 - reduce allocations in Logger.Write() (@​epeshk)
  • #​1955 breaking - collect and propagate Activity.Current.TraceId and SpanId automatically in Logger.Write() (@​nblumhardt)
  • #​1959 - breaking - property value converter optimizations (@​epeshk)
  • #​1964 - don't cache reusable string writers with large buffer sizes (@​Jakimar)
  • #​1969 - README.md updates (@​bartelink)
  • #​1971 - drop test coverage for unsupported .NET Core versions (@​bartelink)

Built-in trace and span id support

This release adds two new first-class properties to LogEvent: TraceId and SpanId. These are set automatically in Logger.Write() to the corresponding property values from System.Diagnostics.Activity.Current.

The major benefit of this change is that sinks, once updated, can reliably propagate trace and span ids through to back-ends that support them (in much the same way that first-class timestamps, messages, levels, and exceptions are used today).

The sinks maintained under serilog/serilog, along with formatting helpers such as Serilog.Formatting.Compact and Serilog.Expressions, are already compatible with this change or have pending releases that add compatibility.

Dropped .NET Core 2.1 and 3.0 support

On .NET Core 2.1 and 3.0, projects targeting Serilog 3.1+ will fail to build, with:

/project/packages/system.runtime.compilerservices.unsafe/6.0.0/buildTransitive/netcoreapp2.0
/System.Runtime.CompilerServices.Unsafe.targets(4,5): error : System.Runtime.CompilerServices.Unsafe
doesn't support netcoreapp2.1. Consider updating your TargetFramework to netcoreapp3.1 or later.

Affected consumers should continue to use Serilog 3.0 or earlier. See serilog/serilog#1983 for a discussion of this issue.

Technical breaking changes

Trace and span id placeholders

Trace and span id collection includes support for {TraceId} and {SpanId} placeholders in output templates (commonly used when formatting text log files). Where previously these names resolved to user-defined properties, they now resolve to the built-in LogEvent.TraceId and LogEvent.SpanId values, respectively.

Impact is expected to be low/zero, because the trace and span id values in any user-added properties are almost certainly identical to the built-in ones.

nint and nuint (IntPtr and UIntPtr) handling

These integer types were previously logged as structures. They're now correctly logged as scalars.

3.0.1

  • #​1926 - fix JsonFormatter output for renderMessage = true (@​nblumhardt)

Commits viewable in compare view.

Updated Serilog.Extensions.Logging from 3.0.1 to 9.0.2.

Release notes

Sourced from Serilog.Extensions.Logging's releases.

9.0.2

What's Changed

Full Changelog: serilog/serilog-extensions-logging@v9.0.1...v9.0.2

9.0.1

What's Changed

New Contributors

Full Changelog: serilog/serilog-extensions-logging@v9.0.0...v9.0.1

9.0.0

What's Changed

  • #​242 - optimizations (@​jods4)
  • #​247 - reduce allocations (@​nblumhardt)
  • #​244 - document {SourceContext} for MEL logger category (@​DavidHopkinsFbr)
  • #​246 - implement ISupportExternalScope in SerilogLoggerProvider (@​david-obee)
  • #​232 - support ValueTuple arguments to ILogger.BeginScope() (@​jimbojim1997)
  • #​249 - support for ITuple arguments to ILogger.BeginScope() (@​sungam3r)
  • #​252 - remove logger scope side-effects (@​pavel-faltynek)
  • #​255 - optimize/reduce allocations (@​epeshk)
  • #​260 - EventId property cache improvements/optimization (@​AndreReise)
  • #​262 - support IAsyncDisposable on .NET 6+ (@​agehrke)

8.0.0

  • #​227 - capture trace and span ids for Serilog 3.1 (@​nblumhardt)
  • #​234 - update to .NET 8 RTM and Serilog 3.1.1 (@​nblumhardt)

7.0.0

  • #​203 - observe LogLevel.None (@​0xced)
  • #​212 - eliminate some enumerator boxing (@​sungam3r)
  • #​210 - clean-up (@​sungam3r)
  • #​214 - migrate to .NET 7 and C# 11 (@​sungam3r)
  • #​216 - reduce allocations by caching trimmed @ and $ keys (@​sungam3r)
  • #​218 - fix exception handling in audit mode (@​sungam3r)
  • #​221 - add API approval tests (@​sungam3r)
  • #​222 - pin to Microsoft.Extensions.Logging v7 (@​nblumhardt)

3.1.0

  • #​189 - pass original EventId through to logger providers (@​david-driscoll)
  • #​188 - bump Serilog dependency version (@​bdovaz)
  • #​182 - README updates (@​Rabadash8820)
  • #​166 - cache parsed message templates (@​nblumhardt)
  • #​173 - use latestFeature in global.json (@​skomis-mm)
  • #​164 - suppress exceptions from FormattedLogValues (@​nblumhardt)
  • #​165 - pin .NET Core SDK version (@​ralphhendriks)
  • #​160 - add stringification support (@​jonnybi)
  • #​156 - avoid deprecated NuGet package properties (@​andrewlock)
  • #​152 - tidy up and documentation updates (@​sungam3r)

Commits viewable in compare view.

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps Serilog from 3.0.0 to 4.2.0
Bumps Serilog.Extensions.Logging from 3.0.1 to 9.0.2

---
updated-dependencies:
- dependency-name: Serilog
  dependency-version: 4.2.0
  dependency-type: direct:production
  update-type: version-update:semver-major
- dependency-name: Serilog.Extensions.Logging
  dependency-version: 9.0.2
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Oct 29, 2025

Labels

The following labels could not be found: dependabot, dependencies. Please create them before Dependabot can add them to a pull request.

Please fix the above issues or remove invalid values from dependabot.yml.

@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Oct 29, 2025

Looks like these dependencies are no longer updatable, so this is no longer needed.

@dependabot dependabot bot closed this Oct 29, 2025
@dependabot dependabot bot deleted the dependabot/nuget/Infrastructure/multi-5f23a99f97 branch October 29, 2025 22:20
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