ChangemakerStudios / serilog-sinks-mongodb

A sink for Serilog that writes events to MongoDB
Apache License 2.0
92 stars 53 forks source link

Remove obsolete dependencies #39

Closed merbla closed 3 years ago

merbla commented 6 years ago

Currently the 4.0 release still relies on older implementations of formatters, these should be removed/updated

See: https://ci.appveyor.com/project/serilog/serilog-sinks-mongodb/branch/master

C:\projects\serilog-sinks-mongodb\src\Serilog.Sinks.MongoDB\Sinks\MongoDB\MongoDBJsonFormatter.cs(62,33): warning CS0672: Member 'MongoDBJsonFormatter.WriteJsonProperty(string, object, ref string, TextWriter)' overrides obsolete 
member 'JsonFormatter.Write
JsonProperty(string, object, ref string, TextWriter)'. Add the Obsolete attribute to 'MongoDBJsonFormatter.WriteJsonProperty(string, object, ref string, TextWriter)'.
C:\projects\serilog-sinks-mongodb\src\Serilog.Sinks.MongoDB\Sinks\MongoDB\MongoDBJsonFormatter.cs(50,13): warning CS0618: 'JsonFormatter.JsonFormatter(bool, string, bool, IFormatProvider)' is obsolete: 'The omitEnclosingObject 
parameter is obsolete and wil
l be removed in a future Serilog version.'
C:\projects\serilog-sinks-mongodb\src\Serilog.Sinks.MongoDB\Sinks\MongoDB\MongoDBJsonFormatter.cs(79,17): warning CS0618: 'JsonFormatter.WriteJsonProperty(string, object, ref string, TextWriter)' is obsolete: 'Extension of 
JsonFormatter by subclassing is o
bsolete and will be removed in a future Serilog version. Write a custom formatter based on JsonValueFormatter instead. See https://github.com/serilog/serilog/pull/819.'
Jaben commented 3 years ago

Thanks for the suggestion.