Skip to content
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

Logging - Turn Off #1433

Closed
zburns opened this issue Jan 9, 2024 · 4 comments
Closed

Logging - Turn Off #1433

zburns opened this issue Jan 9, 2024 · 4 comments

Comments

@zburns
Copy link

zburns commented Jan 9, 2024

Is your feature request related to a problem? Please describe.
No

Describe the solution you'd like
Ability to not have to add any Logging related code or external libraries. You should be able to simply disable logging.

Describe alternatives you've considered
Rolled back to version 2.2.7 - this version works great without all the logging package requirements

Additional context

@bgrainger
Copy link
Member

You should be able to simply disable logging.

Logging is disabled by default. Is there a specific change you'd like implemented?

Ability to not have to add any Logging related code or external libraries.

Is this issue primarily an objection to Microsoft.Extensions.Logging.Abstractions being added as a dependency?

@zburns
Copy link
Author

zburns commented Jan 10, 2024

Yes, adding "Microsoft.Extensions.Logging.Abstractions" is my main concern, as that adds other dependencies also like "Microsoft.Extensions.DependencyInjection.Abstractions" and "System.Buffers" and "System.Memory", etc.

I feel like I'm in DLL hell again trying to track all this down and make sure it's all working with various projects without having to mix versions of things.

I left MySQL.Data (which was a simple one dll drop-in) because of a MariaDB and MySQL compatibility issue that MySqlConnector doesn't have.

Frankly, I love your work - simplifies my life - just trying to make it even simpler 😃

Thanks for considering this request.

@bgrainger
Copy link
Member

I didn't make the decision to add Microsoft.Extensions.Logging.Abstractions lightly, since it did add the first "real" dependency to this project. (There are some other dependencies for the net462 TFM, etc., but net7.0 and net8.0 don't depend on anything else.) You can read all the rationale here: #1110.

I left MySQL.Data (which was a simple one dll drop-in)

I'm not sure what you mean by this; that package has had lots of dependencies for a very long time, e.g., https://www.nuget.org/packages/MySql.Data/8.2.0#dependencies-body-tab. (And they've had packaging bugs that have made it impossible to install.)

I feel like I'm in DLL hell again trying to track all this down and make sure it's all working with various projects without having to mix versions of things.

I'm not sure I understand the problem. dotnet add package MySqlConnector (or the NuGet Package Manager in VS) will install the package and the right versions of all dependencies. In my experience, it "just works".

Are you still using old-style (non-SDK) projects and packages.config? If so, that will make your life unnecessarily difficult and I'd strongly recommend updating to SDK projects.

Finally, if you're not using modern .NET 8.0 and are still using .NET Framework 4.7.2 or similar, you may wish to just stay on version 2.2.7. It's very stable, and none of the .NET-8.0-related changes in 2.3.0 will be applicable to .NET Framework anyway. If v2.3.0 has more drawbacks than benefits, there's no reason to upgrade. (Obviously I think it's an improvement for most MySqlConnector users, but our situations may be different and we may disagree on this point.)

@zburns
Copy link
Author

zburns commented Jan 10, 2024

I appreciate your recommendations. I'll stick with the 2.2.7 as it works for my current projects. I hate to get too far behind, so I'll look at your recommendations and change my tooling to adapt - obviously there are advantages to doing so.

Again, thanks for all your hard work on this project!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants