-
-
Notifications
You must be signed in to change notification settings - Fork 659
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Newest version of Microsoft.Extensions.Logging.Abstractions requires too many dependencies #1106
Comments
Hi @gregoryjtom , good point but this was a new change in v40 requested by a number of people. See the v40 discussion here. #906 So essentially some users wanted to use standard logging libraries which we have never supported since day 1. v40 was a big change and it seemed like a good time to add that in. But the downside is we have a dependency on MELA which is unavoidable as we need the What do you suggest for a solution? One idea: Publish 2 different nuget libraries. One which references MELA and one which does not.
(or flip the naming and make |
@gregoryjtom what framework is your application targeting?
Without have done exhaustive experimentation it looks like if you use at least net48 you should not see 15+ dlls. @robinrodricks
If you want to go with publishing multiple packages, I proposed in #906 (comment) to make logging using MELA an extension package such that you have
|
Hi @jnyrup thanks for the testing and your comments. Yes I agree that we should not duplicate the core packages.
|
I think that is a good idea. I have also run into this problem to a certain degree. |
@jnyrup Any idea how these 2 packages would interact?
I'm finding it hard to understand what |
With help from https://stackoverflow.com/questions/5646820/logger-wrapper-best-practice/5646876#5646876 here's a prototype of how it could be structured. |
@jnyrup Wow that was fast. I like this implementation overall, especially how it eliminates the forced dep on MELA. How would one use this in practice?
|
Merged into master. Any suggested next steps @jnyrup or should I release? @FanDjango you want to play with it before release? |
yes
FluentFTP/FluentFTP.Logging/FluentFTP.Logging.csproj Lines 9 to 16 in 7a40a73
|
I've played with it. Yippee... no more MELA to be distributed along with my application - I tested the case where I am not using it. This is worthy of a release. Needs doc in Wiki of course, this change so soon after V40 introduction of external logging. |
Great.
Why not. Most people would not have used MELA anyway.
Yes but thanks for the reminder. |
Published v43. I have wait for Nuget to update then I can publish the first version of 43.0.0
|
Done. Published - https://www.nuget.org/packages/FluentFTP.Logging/1.0.0 Wiki updated - https://github.com/robinrodricks/FluentFTP/wiki/Logging Code updated - https://github.com/robinrodricks/FluentFTP/wiki/Logging#how-do-i-log-all-ftp-commands-to-a-file-for-debugging Guide updated - https://github.com/robinrodricks/FluentFTP/wiki/v40-Migration-Guide#6-use-the-new-logging-system Thanks @jnyrup for the help/suggestion. |
I am closing this issue. If further issues arise with logging, please file a new issue. Thanks all. |
FluentFTP Version: 42.1.0
Currently, the README states that the library has only one dependency - Microsoft.Extensions.Logging.Abstractions. However, this is only true if you use the 2.1.0 version of that library.
For my use case, I would like to use the most up-to-date version (currently 7.0.0) of the library for security/reliability reasons, but this would require 15+ more dependencies because of added dependencies for the newer versions. A solution to this would be much appreciated. Further, once Microsoft deprecates all older versions of the library, we will all run into this problem at some point.
The text was updated successfully, but these errors were encountered: