Readme: https://github.com/manigandham/serilog-sinks-googlecloudlogging/blob/master/README.md
- Updated minimum framework target from
netstandard2.0
tonetstandard2.1
. - Updated to new
Google.Cloud.Logging.V2
library which now uses GAX v4.0.0 with breaking changes, a new GRPC implementation, and now targets .NET Standard 2.1 at minimum. - Updated nuget references.
- Removed
UseJsonOutput
option and made JSON the only output type for logging. Serilog and Google Cloud Logging are designed and optimmized for fully structured logging and there is no benefit to basic text logging anymore. You can still log only strings if you need to, however this is not recommended. - Updated demo app to minimal APIs style for .NET 6 with the latest Serilog example.
- Updated nuget references to latest versions.
- Ensure
LogName
stays under length limit.
- Added
net6.0
target framework. - Added check for max log entry size according to GCP limits: https://cloud.google.com/logging/quotas (set to 250KB because limits are approximate). Oversized messages will be logged to Serilog SelfLog.
- Added
TraceSampled
to log correlation set of properties. - Updated documentation.
- Refactored sink to accept
ITextFormatter
for full control over rendering a log event. - Config validation on sink initialization will throw exceptions for known bad config values.
- Performance improvements and reduced allocations.
- Enabled nullable reference types for project and updated type definitions for extra safety.
- Improved XML comments and documentation.
- Updated nuget references to latest versions.
- Added
UseLogCorrelation
option to allow log integration with Google Cloud Trace. Defaults totrue
. - Fixed bug with incorrect log correlation trace/span ids.
- Updated nuget references to latest versions.
- Added
net5.0
framework target.
- Added new config property for minimal logging level for sink.
- Added support for level switch to change minimum logging level at runtime.
- Updated nuget references and used new
IBatchedLogEventSink
interface forSerilog.Sinks.PeriodicBatching
. - Fixed bug with
IBatchedLogEventSink
implementation. - Added
QueueSize
parameter for internal batching queue. SeePeriodicBatchingSinkOptions
for details.
- Updated Nuget references, including
Google.Cloud.Logging.V2
to 3.0.0. - Dropped support for
netstandard1.5
.
- 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).
- Log names are automatically formatted to match requirements (trim unsafe characters and apply URL encoding).
- Updated 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.