Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
2.12.0
->4.2.0
Release Notes
serilog/serilog (Serilog)
v4.2.0
What's Changed
New Contributors
Full Changelog: serilog/serilog@v4.1.0...v4.2.0
v4.1.0
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 theBufferingTimeLimit
no longer implicitly causes the retry time to be extended or reduced. If you need a specific retry time, setBatchingOptions.RetryTimeLimit
, which reliably controls retry time.v4.0.2
get
accessors (@nblumhardt)IDisposable
inLog.CloseAndFlushAsync()
when the target logger is notIAsyncDisposable
(@nblumhardt)v4.0.1
HashSet
instances, reduce LINQ usage, avoid reallocatingstring[]
to improve performance and cut GC pressure (@nblumhardt)Major.Minor.0.0
assembly versioning (@nblumhardt)v4.0.0
What's new in Serilog 4.0.0?
Simple, robust, built-in batching support
Sinks that need batching functionality can now be easily written, without any additional package dependencies, by implementing
IBatchedLogEventSink
: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 originalSerilog.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.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
UtcTimestamp
as a built-in token in output templates (@MatthewHays)ReusableStringWriter
(@nblumhardt)LogEvent.UnstableAssembleFromParts()
(@nblumhardt)IBatchedLogEventSink
andWriteTo.Sink(IBatchedLogEventSink)
(@nblumhardt)LoggerSinkConfiguration.CreateSink()
and redesign.Wrap()
(@nblumhardt, @bartelink)MessageTemplateParser
performance, switch to allow.
in captured property names (@nblumhardt)}
in message template format specifiers (@Insomniak47)v3.1.1
ReusableStringWriter
with large renderings (@nblumhardt)This is a bugfix for release 3.1.0.
v3.1.0
CHANGES.md
(@sungam3r)README.md
updates (@nblumhardt)GetTypeInfo()
calls (@SimonCropp)Logger.Write()
(@epeshk)Activity.Current.TraceId
andSpanId
automatically inLogger.Write()
(@nblumhardt)README.md
updates (@bartelink)Built-in trace and span id support
This release adds two new first-class properties to
LogEvent
:TraceId
andSpanId
. These are set automatically inLogger.Write()
to the corresponding property values fromSystem.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:
Affected consumers should continue to use Serilog 3.0 or earlier. See https://github.com/serilog/serilog/issues/1983 for a discussion of this issue.
Technical breaking change
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-inLogEvent.TraceId
andLogEvent.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.
v3.0.1
JsonFormatter
output forrenderMessage = true
(@nblumhardt)v3.0.0
What's new in 3.0.0?
Target framework changes - Serilog no longer targets
netstandard1.x
or .NET Framework versions earlier than .NET 4.6.2. Users on affected frameworks should continue to target Serilog 2.12.x.Removed obsolete APIs - Many deprecated/obsolete types and functions have been removed. Notably,
JsonFormatter
can no longer be subclassed (either port toJsonValueFormatter
, use Serilog.Expressions, or copy the originalJsonFormatter
code into your project).Added APIs -
LevelAlias.Off
is now provided as an equivalent to Microsoft.Extensions.Logging'sLogLevel.Off
;Destructure.AsDictionary<T>()
can now be used to mark dictionary types.Fewer allocations on many hot paths - A lot of work has gone into avoiding heap allocations wherever possible.
Changes
IEnumerator
allocation (#1769) by @igor84 in https://github.com/serilog/serilog/pull/1770ScalarValue.Null
by @sungam3r in https://github.com/serilog/serilog/pull/1774Tokens
->TokenArray
by @sungam3r in https://github.com/serilog/serilog/pull/1778netstandard1.3
andnetstandard1.0
support by @SimonCropp in https://github.com/serilog/serilog/pull/1807JsonFormatter.Escape
by @SimonCropp in https://github.com/serilog/serilog/pull/1804WriteLine(char)
by @SimonCropp in https://github.com/serilog/serilog/pull/1803JsonFormatter
by subclassing by @SimonCropp in https://github.com/serilog/serilog/pull/1801LoggerSinkConfiguration
by @SimonCropp in https://github.com/serilog/serilog/pull/1800StringWriter.ToString()
calls by @sungam3r in https://github.com/serilog/serilog/pull/1782RawFormatter
type by @nblumhardt in https://github.com/serilog/serilog/pull/1808OutputProperties.GetOutputProperties()
by @SimonCropp in https://github.com/serilog/serilog/pull/1805Where()
calls inFindConfigurationMethods()
by @SimonCropp in https://github.com/serilog/serilog/pull/1812net45
support by @SimonCropp in https://github.com/serilog/serilog/pull/1811GetTypeInfo()
inLoadConfigurationAssemblies
by @SimonCropp in https://github.com/serilog/serilog/pull/1817GetTypeInfo()
fromFindConfigurationMethods(()
by @SimonCropp in https://github.com/serilog/serilog/pull/1815GetTypeInfo()
inEnumScalarConversionPolicy
by @SimonCropp in https://github.com/serilog/serilog/pull/1816PropertyToken
constructor by @SimonCropp in https://github.com/serilog/serilog/pull/1819switch
expressions by @SimonCropp in https://github.com/serilog/serilog/pull/1818TextWriter.Write()
by @sungam3r in https://github.com/serilog/serilog/pull/1775SettingValueConversions
by @SimonCropp in https://github.com/serilog/serilog/pull/1814GetPropertiesRecursive()
performance by @SimonCropp in https://github.com/serilog/serilog/pull/1813Convert.ToHexString()
inByteArrayScalarConversionPolicy()
by @sungam3r in https://github.com/serilog/serilog/pull/1776FEATURE_ASYNCLOCAL
by @SimonCropp in https://github.com/serilog/serilog/pull/1822FEATURE_HASHTABLE
by @SimonCropp in https://github.com/serilog/serilog/pull/1823IsEnum
for enum check inEnumScalarConversionPolicy
by @SimonCropp in https://github.com/serilog/serilog/pull/1825Hashtable
use inMessageTemplateCache
by @SimonCropp in https://github.com/serilog/serilog/pull/1828GetTypeInfo()
fromPropertyValueConverter
by @SimonCropp in https://github.com/serilog/serilog/pull/1824GetType()
inPropertyValueConverter
by @SimonCropp in https://github.com/serilog/serilog/pull/1832TryAdd()
and items constructor by @SimonCropp in https://github.com/serilog/serilog/pull/1830PropertyValueConverter
by @SimonCropp in https://github.com/serilog/serilog/pull/1831net46
target tonet461
by @SimonCropp in https://github.com/serilog/serilog/pull/1827JsonValueFormatter
by @SimonCropp in https://github.com/serilog/serilog/pull/1835var
inJsonFormatter
by @SimonCropp in https://github.com/serilog/serilog/pull/1838SelfLog.Out
by @SimonCropp in https://github.com/serilog/serilog/pull/1837JsonFormatter
omitEnclosingObject
overload by @SimonCropp in https://github.com/serilog/serilog/pull/1834PushProperties()
by @SimonCropp in https://github.com/serilog/serilog/pull/1836_minimumLevel
and_levelSwitch
on stack by @SimonCropp in https://github.com/serilog/serilog/pull/1840int
where possible by @SimonCropp in https://github.com/serilog/serilog/pull/1841JsonFormatter
by @SimonCropp in https://github.com/serilog/serilog/pull/1839char
inJsonFormatter
by @sungam3r in https://github.com/serilog/serilog/pull/1842net471
DisableImplicitFrameworkReferences
by @SimonCropp in https://github.com/serilog/serilog/pull/1846TargetFramework
constants in tests by @SimonCropp in https://github.com/serilog/serilog/pull/1847net471
supportsITuple
by @SimonCropp in https://github.com/serilog/serilog/pull/1849FEATURE_GETCURRENTMETHOD
const by @SimonCropp in https://github.com/serilog/serilog/pull/1851PublicApi_Should_Not_Change_Unintentionally()
test by @SimonCropp in https://github.com/serilog/serilog/pull/1864net461
tonet462
by @SimonCropp in https://github.com/serilog/serilog/pull/1863GetPackagingOutputs
by @SimonCropp in https://github.com/serilog/serilog/pull/1867ReusableStringWriter
by @igor84 in https://github.com/serilog/serilog/pull/1771langword
in XML comments by @sungam3r in https://github.com/serilog/serilog/pull/1871SafeAggregateSink
wrapper around empty list by @sungam3r in https://github.com/serilog/serilog/pull/1878Alignment
andLevelOverrides
readonly by @sungam3r in https://github.com/serilog/serilog/pull/1884CallerArgumentExpressionAttribute
by @SimonCropp in https://github.com/serilog/serilog/pull/1886MessageTemplateToken.StartIndex
by @SimonCropp in https://github.com/serilog/serilog/pull/1882LoggerSinkConfiguration.Sink(ILogEventSink, LogEventLevel)
by @nblumhardt in https://github.com/serilog/serilog/pull/1889Array.Empty
by @SimonCropp in https://github.com/serilog/serilog/pull/1898ReadOnlyDictionary
asDictionary
by @sungam3r in https://github.com/serilog/serilog/pull/1897IDictionary
cast by @SimonCropp in https://github.com/serilog/serilog/pull/1900WriteTo.Logger()
by @srogovtsev in https://github.com/serilog/serilog/pull/1890AddPropertyIfAbsent
by @sungam3r in https://github.com/serilog/serilog/pull/1872levelSwitch
option inWriteTo.Logger()
by @nblumhardt in https://github.com/serilog/serilog/pull/1902net47
target by @SimonCropp in https://github.com/serilog/serilog/pull/1905WithProperty()
by @sungam3r in https://github.com/serilog/serilog/pull/1907LoggingLevelSwitch.MinimumLevelChanged
by @sungam3r in https://github.com/serilog/serilog/pull/1908Destructure.AsDictionary<T>()
by @sungam3r in https://github.com/serilog/serilog/pull/1906LevelAlias.Off
; fixes #1684 by @nblumhardt in https://github.com/serilog/serilog/pull/1910JsonValueFormatter
to implement classicJsonFormatter
by @nblumhardt in https://github.com/serilog/serilog/pull/1911README.md
in the NuGet package for display on nuget.org by @nblumhardt in https://github.com/serilog/serilog/pull/1916Configuration
📅 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.
This PR was generated by Mend Renovate. View the repository job log.