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.
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.
You can trigger a rebase of this PR 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 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)
Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.
Bumps Serilog.Sinks.Observable and Serilog. These dependencies needed to be updated together. Updates
Serilog.Sinks.Observable
from 2.0.2 to 3.0.0Release notes
Sourced from Serilog.Sinks.Observable's releases.
Commits
6b024db
Merge pull request #12 from serilog/dev51e49c6
Update publishing key4bb31bf
Main branch rename [skip ci]739aebe
Merge pull request #11 from Numpsy/updatesff79e21
Don't think theres a need for InternalsVisibleTo52abed2
Packaging updates:4e7a573
Enable nullability annotations448e373
Rx-Main -> System.Reactive.Linqce2bdbd
Update test libsdbd24a9
update Serilog to v4Updates
Serilog
from 3.1.1 to 4.0.0Release notes
Sourced from Serilog's releases.
... (truncated)
Commits
573a628
Merge pull request #2067 from serilog/deve963475
Attempt to make tests more robust on slow CI machines by increasing time steps5e18faf
Update all dependencies, fix new xUnit lints9fcf795
Move TrimConfiguration to Capturing namespace, 'Configuration' namespace is j...4ef3a87
Remove noop byte cast9d3a088
fix: only disallows '}' in format strings, use byte comparison920b8c8
fix: allows all printable characters as format valuese1a0047
Typo - to -> do921eccc
Scope back to only considering dots; improve tests592a124
Improve commentYou can trigger a rebase of this PR 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