Repository navigation
Conversation
|
One issue I see so far: 3 projects depend on common logging. And the dependency between the projects looks like this: EventSource <- Common <- Client In any case, waiting for your feedback on this. |
|
btw, I see that you actually used Microsoft.Extensions.Logging before. |
The reason for the change was briefly described in issue #78. |
It's actually 4 - there's also our beta Xamarin client. This is a big concern I would have about putting in a new logging framework that's not actually shared between assemblies: if there is any significant change in it, then we would have to re-release all of those things, rather than just upgrading one dependency at the application level. The other concern is of course just that this could require all our customers to once again change how their projects are set up. Although I'm not entirely sure what would happen if you took a project that currently had, say, Log4Net and Common.Logging, and then changed the library to use LibLog - would it just continue to work because it would auto-detect Log4Net? In any case, I think this is something that will require more thought and we will probably also want to survey other developers in our community. The goal is to provide something that will work for, ideally, everyone. |
If you would like to have a shared logging framework, you can go for the option There should be no changes to this library ( in theory ;) ). Because the main thing that LibLog does is provides a way to hook up your own logging framework in the library and doesn't do any logging by itself.
Yes, it should automatically detect |
Warning: this change is not backwards compatible
|
I'm not sure what a As for "there should be no changes to this library" (LibLog), I am skeptical. If there is any change in the API of any of the logging frameworks that it supports, I don't see how it would be possible to avoid having to update it. It seems to me like very much the same issue as keeping the Common.Logging connectors up to date, except that it would be baked into our library code. |
|
Let me start by quoting Damian Hickey, the author of LibLog here:
So, the issue we have is the exact one that is described by Damian in Also, in case an API of a specific logging library changes, I will quote Damian:
|
|
Am I correct that in your implementation, if you are using the LaunchDarkly SDK and want to specify a custom logging provider, you would have to specify it individually for each of the (3) assemblies in the SDK? If so, that is a problem as we really don't want people to have to worry about the exact internal structure of the project. |
|
In this exact PR, yes. That is why I mentioned the option
Please see my first comment for more details and links |
Wires the contract-tests service added earlier in this PR into CI so we actually validate LaunchDarkly.EventSource's SSE behavior against the sse-contract-tests harness on every push. Without this step the test service was inert -- the code existed but nothing ran the harness against it. Follows the pattern used by launchdarkly/eventsource (Go) and launchdarkly/okhttp-eventsource (Java): a Makefile at repo root with build-contract-tests / start-contract-test-service-bg / contract-tests targets, plus a GitHub Actions job that uses the shared launchdarkly/gh-actions/actions/contract-tests action to download and run a released harness (VERSION=v2, currently resolves to v2.31.0). Once the payload-size-stress-testable capability (defined in sse-contract-tests PR #42) lands in a released v2.x, this job will automatically pick up the sweep on its next run -- no additional CI changes needed. The extra_params skips four pre-existing dotnet-eventsource behavioral gaps unrelated to SDK-2755: null-byte ID handling, CR-only line terminator parsing, CRLF-split-across-chunks handling, and partial-message ID carry-over on reconnect. Filed a follow-up ticket to survey and fix these; once fixed, remove the corresponding --skip.
Warning: this change is not backwards compatible
Why did I create this PR?
At albelli we were using LaunchDarkly.Client of version 3.3.2, which doesn't depend on Common.Logging. Our application however does depend on it, but on a very old version, namely 2.2.0.
We are also using log4net and a Common.Logging connector (note the old version number), which was not as restrictive as the new version. Due to legacy reasons, we have a bunch of different packages with slightly different versions of log4net. Assembly redirects solved the problem most of the time. But since your package depends on the new version of Common.Logging (and it should, since .NET core), the aforementioned connector should also be updated. But it requires only a specific log4net version.
All that results in us being unable to run our application if we update the SDK version.
What does this PR do exactly?
Since Common.Logging is a quite an old framework, which is not very actively maintained nowadays, I suggest to use LibLog instead. It doesn't generate any additional dependencies, since it's installed as a source file.
The new version also has fancy installation way, but it doesn't support netstandard < 2.0, so I am installing it "the old way": by just copying the file in the source directory.
If you would consider dropping support for netstandard1.x, this file can be skipped and the PR would be more concise.
I already emailed your support team about that. But since we don't have a lot of time left, I decided that I might as well do a PR upfront.