serilog/serilog
### [`v3.0.1`](https://togithub.com/serilog/serilog/releases/tag/v3.0.1)
- [#1926](https://togithub.com/serilog/serilog/issues/1926) - fix `JsonFormatter` output for `renderMessage = true` ([@nblumhardt](https://togithub.com/nblumhardt))
### [`v3.0.0`](https://togithub.com/serilog/serilog/releases/tag/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 to `JsonValueFormatter`, use *Serilog.Expressions*, or copy [the original `JsonFormatter` code](https://togithub.com/serilog/serilog/blob/4d13be50c03e14b6072043799dc7e5dbe4139a19/src/Serilog/Formatting/Json/JsonFormatter.cs) into your project).
**Added APIs** - `LevelAlias.Off` is now provided as an equivalent to *Microsoft.Extensions.Logging*'s `LogLevel.Off`; `Destructure.AsDictionary()` 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
- Change exception message by [@sungam3r](https://togithub.com/sungam3r) in [https://github.com/serilog/serilog/pull/1762](https://togithub.com/serilog/serilog/pull/1762)
- Avoided `IEnumerator` allocation ([#1769](https://togithub.com/serilog/serilog/issues/1769)) by [@igor84](https://togithub.com/igor84) in [https://github.com/serilog/serilog/pull/1770](https://togithub.com/serilog/serilog/pull/1770)
- Avoid iterator allocations when working with SequenceValue by [@sungam3r](https://togithub.com/sungam3r) in [https://github.com/serilog/serilog/pull/1785](https://togithub.com/serilog/serilog/pull/1785)
- Add API approval test by [@sungam3r](https://togithub.com/sungam3r) in [https://github.com/serilog/serilog/pull/1783](https://togithub.com/serilog/serilog/pull/1783)
- Bump Newtonsoft.Json from 13.0.1 to 13.0.2 in /test/Serilog.Tests by [@dependabot](https://togithub.com/dependabot) in [https://github.com/serilog/serilog/pull/1787](https://togithub.com/serilog/serilog/pull/1787)
- Introduce `ScalarValue.Null` by [@sungam3r](https://togithub.com/sungam3r) in [https://github.com/serilog/serilog/pull/1774](https://togithub.com/serilog/serilog/pull/1774)
- `Tokens` -> `TokenArray` by [@sungam3r](https://togithub.com/sungam3r) in [https://github.com/serilog/serilog/pull/1778](https://togithub.com/serilog/serilog/pull/1778)
- Drop `netstandard1.3` and `netstandard1.0` support by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1807](https://togithub.com/serilog/serilog/pull/1807)
- Remove `JsonFormatter.Escape` by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1804](https://togithub.com/serilog/serilog/pull/1804)
- Use `WriteLine(char)` by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1803](https://togithub.com/serilog/serilog/pull/1803)
- Remove extension of `JsonFormatter` by subclassing by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1801](https://togithub.com/serilog/serilog/pull/1801)
- Remove redundant overrides from `LoggerSinkConfiguration` by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1800](https://togithub.com/serilog/serilog/pull/1800)
- Avoid `StringWriter.ToString()` calls by [@sungam3r](https://togithub.com/sungam3r) in [https://github.com/serilog/serilog/pull/1782](https://togithub.com/serilog/serilog/pull/1782)
- Remove the obsolete `RawFormatter` type by [@nblumhardt](https://togithub.com/nblumhardt) in [https://github.com/serilog/serilog/pull/1808](https://togithub.com/serilog/serilog/pull/1808)
- .NET 7 SDK by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1806](https://togithub.com/serilog/serilog/pull/1806)
- Remove `OutputProperties.GetOutputProperties()` by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1805](https://togithub.com/serilog/serilog/pull/1805)
- Verify API by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1809](https://togithub.com/serilog/serilog/pull/1809)
- Remove redundant nullable suppressions by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1810](https://togithub.com/serilog/serilog/pull/1810)
- Remove duplicate `Where()` calls in `FindConfigurationMethods()` by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1812](https://togithub.com/serilog/serilog/pull/1812)
- Remove `net45` support by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1811](https://togithub.com/serilog/serilog/pull/1811)
- Remove redundant `GetTypeInfo()` in `LoadConfigurationAssemblies` by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1817](https://togithub.com/serilog/serilog/pull/1817)
- Remove `GetTypeInfo()` from `FindConfigurationMethods(()` by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1815](https://togithub.com/serilog/serilog/pull/1815)
- Remove redundant `GetTypeInfo()` in `EnumScalarConversionPolicy` by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1816](https://togithub.com/serilog/serilog/pull/1816)
- Remove obsolete `PropertyToken` constructor by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1819](https://togithub.com/serilog/serilog/pull/1819)
- `switch` expressions by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1818](https://togithub.com/serilog/serilog/pull/1818)
- Do not allocate strings for `TextWriter.Write()` by [@sungam3r](https://togithub.com/sungam3r) in [https://github.com/serilog/serilog/pull/1775](https://togithub.com/serilog/serilog/pull/1775)
- Simplify reflection in` SettingValueConversions ` by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1814](https://togithub.com/serilog/serilog/pull/1814)
- Improve `GetPropertiesRecursive()` performance by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1813](https://togithub.com/serilog/serilog/pull/1813)
- Use `Convert.ToHexString()` in `ByteArrayScalarConversionPolicy()` by [@sungam3r](https://togithub.com/sungam3r) in [https://github.com/serilog/serilog/pull/1776](https://togithub.com/serilog/serilog/pull/1776)
- Remove `FEATURE_ASYNCLOCAL` by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1822](https://togithub.com/serilog/serilog/pull/1822)
- Remove `FEATURE_HASHTABLE` by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1823](https://togithub.com/serilog/serilog/pull/1823)
- Use `IsEnum` for enum check in `EnumScalarConversionPolicy` by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1825](https://togithub.com/serilog/serilog/pull/1825)
- Comments on `Hashtable` use in `MessageTemplateCache` by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1828](https://togithub.com/serilog/serilog/pull/1828)
- Remove `GetTypeInfo()` from `PropertyValueConverter` by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1824](https://togithub.com/serilog/serilog/pull/1824)
- Avoid repeated `GetType()` in `PropertyValueConverter` by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1832](https://togithub.com/serilog/serilog/pull/1832)
- Leverage dictionary `TryAdd()` and items constructor by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1830](https://togithub.com/serilog/serilog/pull/1830)
- Use array instead of list when we know the size in `PropertyValueConverter` by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1831](https://togithub.com/serilog/serilog/pull/1831)
- Move `net46` target to `net461` by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1827](https://togithub.com/serilog/serilog/pull/1827)
- Clean up `JsonValueFormatter` by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1835](https://togithub.com/serilog/serilog/pull/1835)
- `var` in `JsonFormatter` by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1838](https://togithub.com/serilog/serilog/pull/1838)
- Remove obsolete `SelfLog.Out` by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1837](https://togithub.com/serilog/serilog/pull/1837)
- Remove obsolete `JsonFormatter` `omitEnclosingObject` overload by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1834](https://togithub.com/serilog/serilog/pull/1834)
- Remove obsolete `PushProperties()` by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1836](https://togithub.com/serilog/serilog/pull/1836)
- No point putting `_minimumLevel` and `_levelSwitch` on stack by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1840](https://togithub.com/serilog/serilog/pull/1840)
- Avoid casting enum to `int` where possible by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1841](https://togithub.com/serilog/serilog/pull/1841)
- Leverage nullable char in `JsonFormatter` by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1839](https://togithub.com/serilog/serilog/pull/1839)
- Use correct overload with `char` in `JsonFormatter` by [@sungam3r](https://togithub.com/sungam3r) in [https://github.com/serilog/serilog/pull/1842](https://togithub.com/serilog/serilog/pull/1842)
- Annotate Serilog for trimming by [@agocke](https://togithub.com/agocke) in [https://github.com/serilog/serilog/pull/1690](https://togithub.com/serilog/serilog/pull/1690)
- Fix `net471` `DisableImplicitFrameworkReferences` by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1846](https://togithub.com/serilog/serilog/pull/1846)
- Fix 461 `TargetFramework` constants in tests by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1847](https://togithub.com/serilog/serilog/pull/1847)
- Missing API approval by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1848](https://togithub.com/serilog/serilog/pull/1848)
- `net471` supports `ITuple` by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1849](https://togithub.com/serilog/serilog/pull/1849)
- Remove `FEATURE_GETCURRENTMETHOD` const by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1851](https://togithub.com/serilog/serilog/pull/1851)
- macOS CI by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1858](https://togithub.com/serilog/serilog/pull/1858)
- Run tests on mac by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1860](https://togithub.com/serilog/serilog/pull/1860)
- BenchmarkDotNet 0.13.5 by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1861](https://togithub.com/serilog/serilog/pull/1861)
- Cache empty text token by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1859](https://togithub.com/serilog/serilog/pull/1859)
- Simplify `PublicApi_Should_Not_Change_Unintentionally()` test by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1864](https://togithub.com/serilog/serilog/pull/1864)
- Move from `net461` to `net462` by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1863](https://togithub.com/serilog/serilog/pull/1863)
- Remove redundant `GetPackagingOutputs` by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1867](https://togithub.com/serilog/serilog/pull/1867)
- Use char delimiters by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1868](https://togithub.com/serilog/serilog/pull/1868)
- Remove redundant reference assemblies by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1866](https://togithub.com/serilog/serilog/pull/1866)
- Introduce PolySharp by [@sungam3r](https://togithub.com/sungam3r) in [https://github.com/serilog/serilog/pull/1845](https://togithub.com/serilog/serilog/pull/1845)
- Missing PolySharp changes by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1869](https://togithub.com/serilog/serilog/pull/1869)
- Simplify build scripts by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1865](https://togithub.com/serilog/serilog/pull/1865)
- Added `ReusableStringWriter` by [@igor84](https://togithub.com/igor84) in [https://github.com/serilog/serilog/pull/1771](https://togithub.com/serilog/serilog/pull/1771)
- PublicApiGenerator v11 by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1877](https://togithub.com/serilog/serilog/pull/1877)
- Use `langword` in XML comments by [@sungam3r](https://togithub.com/sungam3r) in [https://github.com/serilog/serilog/pull/1871](https://togithub.com/serilog/serilog/pull/1871)
- Avoid creating `SafeAggregateSink` wrapper around empty list by [@sungam3r](https://togithub.com/sungam3r) in [https://github.com/serilog/serilog/pull/1878](https://togithub.com/serilog/serilog/pull/1878)
- Remove obsolete classes by [@sungam3r](https://togithub.com/sungam3r) in [https://github.com/serilog/serilog/pull/1874](https://togithub.com/serilog/serilog/pull/1874)
- Add space settings by [@sungam3r](https://togithub.com/sungam3r) in [https://github.com/serilog/serilog/pull/1885](https://togithub.com/serilog/serilog/pull/1885)
- Make `Alignment` and `LevelOverrides` readonly by [@sungam3r](https://togithub.com/sungam3r) in [https://github.com/serilog/serilog/pull/1884](https://togithub.com/serilog/serilog/pull/1884)
- Remove redundant `CallerArgumentExpressionAttribute` by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1886](https://togithub.com/serilog/serilog/pull/1886)
- Remove `MessageTemplateToken.StartIndex` by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1882](https://togithub.com/serilog/serilog/pull/1882)
- Microsoft.NET.Test.Sdk 17.5.0 by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1862](https://togithub.com/serilog/serilog/pull/1862)
- Throw, rather than exit, when any command in the build script fails by [@nblumhardt](https://togithub.com/nblumhardt) in [https://github.com/serilog/serilog/pull/1887](https://togithub.com/serilog/serilog/pull/1887)
- Suppress some warnings, tidy up some namespacing by [@nblumhardt](https://togithub.com/nblumhardt) in [https://github.com/serilog/serilog/pull/1888](https://togithub.com/serilog/serilog/pull/1888)
- Reinstate `LoggerSinkConfiguration.Sink(ILogEventSink, LogEventLevel)` by [@nblumhardt](https://togithub.com/nblumhardt) in [https://github.com/serilog/serilog/pull/1889](https://togithub.com/serilog/serilog/pull/1889)
- Avoid some alloc with `Array.Empty` by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1898](https://togithub.com/serilog/serilog/pull/1898)
- Destructure `ReadOnlyDictionary` as `Dictionary` by [@sungam3r](https://togithub.com/sungam3r) in [https://github.com/serilog/serilog/pull/1897](https://togithub.com/serilog/serilog/pull/1897)
- Remove redundant `IDictionary` cast by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1900](https://togithub.com/serilog/serilog/pull/1900)
- Adding ability to dispose nested loggers in `WriteTo.Logger()` by [@srogovtsev](https://togithub.com/srogovtsev) in [https://github.com/serilog/serilog/pull/1890](https://togithub.com/serilog/serilog/pull/1890)
- Optimize `AddPropertyIfAbsent` by [@sungam3r](https://togithub.com/sungam3r) in [https://github.com/serilog/serilog/pull/1872](https://togithub.com/serilog/serilog/pull/1872)
- Accept/pass through the standard `levelSwitch` option in `WriteTo.Logger()` by [@nblumhardt](https://togithub.com/nblumhardt) in [https://github.com/serilog/serilog/pull/1902](https://togithub.com/serilog/serilog/pull/1902)
- Add `net47` target by [@SimonCropp](https://togithub.com/SimonCropp) in [https://github.com/serilog/serilog/pull/1905](https://togithub.com/serilog/serilog/pull/1905)
- Annotate `WithProperty()` by [@sungam3r](https://togithub.com/sungam3r) in [https://github.com/serilog/serilog/pull/1907](https://togithub.com/serilog/serilog/pull/1907)
- Add `LoggingLevelSwitch.MinimumLevelChanged` by [@sungam3r](https://togithub.com/sungam3r) in [https://github.com/serilog/serilog/pull/1908](https://togithub.com/serilog/serilog/pull/1908)
- Fix [#1464](https://togithub.com/serilog/serilog/issues/1464), don't log parameter count mismatch message incorrectly by [@nblumhardt](https://togithub.com/nblumhardt) in [https://github.com/serilog/serilog/pull/1903](https://togithub.com/serilog/serilog/pull/1903)
- Add `Destructure.AsDictionary()` by [@sungam3r](https://togithub.com/sungam3r) in [https://github.com/serilog/serilog/pull/1906](https://togithub.com/serilog/serilog/pull/1906)
- Add `LevelAlias.Off`; fixes [#1684](https://togithub.com/serilog/serilog/issues/1684) by [@nblumhardt](https://togithub.com/nblumhardt) in [https://github.com/serilog/serilog/pull/1910](https://togithub.com/serilog/serilog/pull/1910)
- Use `JsonValueFormatter` to implement classic `JsonFormatter` by [@nblumhardt](https://togithub.com/nblumhardt) in [https://github.com/serilog/serilog/pull/1911](https://togithub.com/serilog/serilog/pull/1911)
- Include `README.md` in the NuGet package for display on nuget.org by [@nblumhardt](https://togithub.com/nblumhardt) in [https://github.com/serilog/serilog/pull/1916](https://togithub.com/serilog/serilog/pull/1916)
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.
This PR has been generated by Mend Renovate. View repository job log here.
This PR contains the following updates:
2.12.0
->3.0.1
Release Notes
serilog/serilog
### [`v3.0.1`](https://togithub.com/serilog/serilog/releases/tag/v3.0.1) - [#1926](https://togithub.com/serilog/serilog/issues/1926) - fix `JsonFormatter` output for `renderMessage = true` ([@nblumhardt](https://togithub.com/nblumhardt)) ### [`v3.0.0`](https://togithub.com/serilog/serilog/releases/tag/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 to `JsonValueFormatter`, use *Serilog.Expressions*, or copy [the original `JsonFormatter` code](https://togithub.com/serilog/serilog/blob/4d13be50c03e14b6072043799dc7e5dbe4139a19/src/Serilog/Formatting/Json/JsonFormatter.cs) into your project). **Added APIs** - `LevelAlias.Off` is now provided as an equivalent to *Microsoft.Extensions.Logging*'s `LogLevel.Off`; `Destructure.AsDictionaryConfiguration
π 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 has been generated by Mend Renovate. View repository job log here.