- Updated to simpler GCP
LoggingServiceV2Client
instantiation for better compatibility with latest libraries.
- Improved logging performance (
StringWriter
reuse) and cache log names (using a static dictionary).
- Automatically format log names to match requirements (trim unsafe characters and use url-encoding).
- Update nuget references to latest versions.
- Resource type will use explicitly defined option, or will be automatically discovered with a fallback to Global.
netstandard2.0
added to target frameworks to reduce dependency graph in newer platforms. See guidance at https://docs.microsoft.com/en-us/dotnet/standard/library-guidance/cross-platform-targeting- Replaced
ProjectIconUrl
with localProjectIcon
incsproj
file for nuget packaging.
- Resource type is no longer required and will be automatically discovered if program is running in GCP (AppEngine, GCE, GKE, etc).
- Project ID is no longer required and will be automatically set to the host project if program is running in GCP.
- Breaking:
ErrorReportingServiceName
andErrorReportingServiceVersion
config options changed toServiceName
andServiceVersion
. - Service name and version metadata will be added to all log entries, and will allow exceptions at any level to be picked up by StackDriver error reporting.
- Improved log formatting and excepting handling.
- Better performance and less allocations.
- Fixed bug if there is no exception attached for "Error" entry.
- Added ability for log entries logged as "Error" to be sent to StackDriver error reporting.
- All options can now be configured through
appsettings.json
. - New option to provide Google Application Credentials as JSON text.
- Improved handling of scalar values in JSON output by pattern matching on type instead of attempting to parse to double.
- WARNING: JSON output only accepts numeric values as
double
so all numbers will be converted. Large integers and floating-point values will lose precision. If you want the exact value preserved then send then log it as a string instead.
- Added support for .NET Core Configuration API, using
serilog-settings-configuration
- Labels can be provided in options object constructor or set using properties. Both will be merged together.
- Added SourceLink support for source-code debugging.
- Added
ResourceLabels
configuration option to support additional labels for the Resource type.
- Fixed null value handling (logged as empty string) in text output.
- Additional data type handling for null, bool, numeric, and string scalar values in JSON/Protobuf output.
- Support fully structured logging in GCP via JSON/Protobuf output with configuration option.
- More efficient iteration of attached properties.
- Fixed property handling to handle all Serilog types:
ScalarValue
,SequenceValue
,StructureValue
,DictionaryValue
.
- Option to disable automatic
SourceContext
property. - Added TestWeb project to diagnose log output.
- Fixed property handling to support scalar and nested properties.
- Sink created for GCP stack driver.