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

Update serilog (major) #2040

Merged
merged 1 commit into from
Jun 15, 2024
Merged

Update serilog (major) #2040

merged 1 commit into from
Jun 15, 2024

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.0 age adoption passing confidence
Serilog.Enrichers.Environment 2.3.0 -> 3.0.0 age adoption passing confidence
Serilog.Enrichers.Process (source) 2.0.2 -> 3.0.0 age adoption passing confidence
Serilog.Enrichers.Thread (source) 3.1.0 -> 4.0.0 age adoption passing confidence
Serilog.Sinks.Async (source) 1.5.0 -> 2.0.0 age adoption passing confidence
Serilog.Sinks.Console 5.0.1 -> 6.0.0 age adoption passing confidence
Serilog.Sinks.Debug 2.0.0 -> 3.0.0 age adoption passing confidence

Release Notes

serilog/serilog (Serilog)

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

serilog/serilog-enrichers-environment (Serilog.Enrichers.Environment)

v3.0.0

Breaking changes

The *Enricher types previously published in this assembly are now internal. These all have Enrich.With* configuration syntax alternatives; so, if your code used Enrich.With(new EnvironmentNameEnricher(...)), replace this with Enrich.WithEnvironmentName(...) and so on.

serilog/serilog-enrichers-process (Serilog.Enrichers.Process)

v3.0.0

serilog/serilog-enrichers-thread (Serilog.Enrichers.Thread)

v4.0.0

serilog/serilog-sinks-async (Serilog.Sinks.Async)

v2.0.0

serilog/serilog-sinks-console (Serilog.Sinks.Console)

v6.0.0

serilog/serilog-sinks-debug (Serilog.Sinks.Debug)

v3.0.0

  • Build on VS2022 (@​SimonCropp)
  • #​14 - updates for Serilog 4 (@​Numpsy)
    • Update version to 3.0.0
    • Update TFMs to match Serilog 4
    • Update Serilog to v4 and all other deps to latest
    • Enable SourceLink and publish a snupkg file
    • Put the readme.md in the nuget package
    • Seal the Sink class

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.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


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

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot added the 📦 dependencies Pull requests that update a dependency file label Jun 1, 2024
@renovate renovate bot changed the title Update dependency Serilog to v4 Update serilog (major) Jun 7, 2024
@renovate renovate bot force-pushed the renovate/major-serilog branch from 23ce40e to f0c771d Compare June 7, 2024 00:15
@github-actions github-actions bot added this to the v2.0.1 milestone Jun 7, 2024
@renovate renovate bot force-pushed the renovate/major-serilog branch from f0c771d to 4b360f1 Compare June 10, 2024 01:06
@renovate renovate bot force-pushed the renovate/major-serilog branch from 4b360f1 to 2e965b0 Compare June 14, 2024 10:14
@david-driscoll david-driscoll merged commit 3425967 into master Jun 15, 2024
6 checks passed
@david-driscoll david-driscoll deleted the renovate/major-serilog branch June 15, 2024 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant