serilog-archive / serilog-sinks-azuredocumentdb

A Serilog sink that writes to Azure DocumentDB
Apache License 2.0
17 stars 15 forks source link

Sink does not work with Microsoft.Azure.DocumentDB 1.15.0 #60

Closed acgritt closed 7 years ago

acgritt commented 7 years ago

There has apparently been a change within Microsoft.Azure.DocumentDB 1.15.0 that doesn't work with the sink. The following error is generated when using it with the latest version of the Azure DocumentDB Sink.

System.MissingMethodException: Method not found: 'Void Microsoft.Azure.Documents.Client.DocumentClient..ctor(System.Uri, System.String, Microsoft.Azure.Documents.Client.ConnectionPolicy, System.Nullable1)'. at Serilog.Sinks.AzureDocumentDb.AzureDocumentDBSink..ctor(Uri endpointUri, String authorizationKey, String databaseName, String collectionName, IFormatProvider formatProvider, Boolean storeTimestampInUtc, Protocol connectionProtocol, Nullable1 timeToLive) at Serilog.LoggerConfigurationAzureDocumentDBExtensions.AzureDocumentDB(LoggerSinkConfiguration loggerConfiguration, Uri endpointUri, String authorizationKey, String databaseName, String collectionName, LogEventLevel restrictedToMinimumLevel, IFormatProvider formatProvider, Boolean storeTimestampInUtc, Protocol connectionProtocol, Nullable`1 timeToLive)

Looking at the code for Microsoft.Azure.DocumentDB.Client.DocumentClient, a new parameter was added to the constructor and set to default as NULL but just updating the NuGet Package causes it to break.

saleem-mirza commented 7 years ago

@acgritt, thanks for reporting this issue. I'll investigate it over weekend.

saleem-mirza commented 7 years ago

@acgritt, Please try latest pre-release version (3.6.8-dev-00148) and let me know if it works or not.

Install-Package Serilog.Sinks.AzureDocumentDb -Pre
acgritt commented 7 years ago

@saleem-mirza The new pre-release version seems to have fixed the issue.

aagarwal10 commented 7 years ago

@saleem-mirza - any idea when you can push this fix as a released version ?? Thanks,

aagarwal10 commented 7 years ago

@saleem-mirza - We are starting a new aspnet core project very soon and would love to use this sink for logging.

saleem-mirza commented 7 years ago

@aagarwal10 I'm traveling and hopping to be back in my desk by 20th. I'll release it soon.

aagarwal10 commented 7 years ago

@saleem-mirza - Thanks, Appreciate it.