Skip to content
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

chore: Update dependency Serilog to v4 #1561

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jun 1, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
Serilog (source) 3.1.1 -> 4.0.1 age adoption passing confidence

Release Notes

serilog/serilog (Serilog)

v4.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)

v4.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


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added the dependencies label Jun 1, 2024
@renovate renovate bot force-pushed the renovate/serilog-4.x branch 3 times, most recently from ea56b71 to 1cd123a Compare June 23, 2024 12:30
@renovate renovate bot force-pushed the renovate/serilog-4.x branch 2 times, most recently from e3798f3 to f783598 Compare July 25, 2024 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

0 participants