log4net.ElasticSearch icon indicating copy to clipboard operation
log4net.ElasticSearch copied to clipboard

Problem If having Empty connection string

Open KamranShahid opened this issue 5 years ago • 9 comments

I am creating Connection string dynamically. when i am leaving my default connection string to empty my application get into infinite loop. I am using .net core 3.1. On investigation i found the reason is due to Uri.cs Ideal fix should be like in the attached class

Uri.zip

KamranShahid avatar Nov 18 '20 12:11 KamranShahid

I don't follow what is the culprit of the error. You can make a pull request here on GitHub to offer the code that fixes the problem.

With that I can review the change and merge, and release.

bruno-garcia avatar Dec 06 '20 01:12 bruno-garcia

culprit was not checking dictionary.containsKey for various key in connection string. will learn about this pull request in a bit of free time

KamranShahid avatar Dec 06 '20 06:12 KamranShahid

Hi @bruno-garcia , Hope you are doing good. Is it possible to make latest build available on nuget package with this fix and any other code improvement you have done since 2.5.0 In nuget What I can see is preview release (2.6.0-preview2) with dated Tuesday, October 15, 2019.

KamranShahid avatar May 28 '21 11:05 KamranShahid

Good point. I'll make a release this weekend.

bruno-garcia avatar May 28 '21 12:05 bruno-garcia

Good point. I'll make a release this weekend.

Thanks bruno. Do add a small line here whenever it is done Thanks

KamranShahid avatar May 31 '21 08:05 KamranShahid

I pushed another preview out, please let me know how things work so we can roll out a stable one: https://www.nuget.org/packages/log4net.ElasticSearch/2.6.0-preview3

bruno-garcia avatar Jun 01 '21 22:06 bruno-garcia

I pushed another preview out, please let me know how things work so we can roll out a stable one: https://www.nuget.org/packages/log4net.ElasticSearch/2.6.0-preview3

Looks like This preview have null check resolved via new extension method? One thing i noted is it is using old nuget pacakges for log4net and newtonsoft. it would be great if you can use the updated packages there as well

KamranShahid avatar Jun 02 '21 09:06 KamranShahid

Looks like This preview have null check for resolve via new extension method?

Sorry but I'm not sure I understood the question. Could you please clarify?

One thing i noted is it is using old nugetpacakges for log4net and newtonsoft. it would be great if you can use the updated pacakges there as well

I updated log4net because there's a security issue in it, but feel free to set the latest version for those directly on to your project. .NET then will prefer the explicit version. This package supporting a lower version just means if you (for some reason) is stuck on an older version, this package will be fine with it. But you're free to explicitly set the latest (ideally matching the major).

bruno-garcia avatar Jun 03 '21 03:06 bruno-garcia

I was saying that if some configuration of connection string missing i hope no exception raise in the current preview release. I have upgraded to preview release and will be unit testing things in upcoming days. Thanks

KamranShahid avatar Jun 07 '21 14:06 KamranShahid