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

Remove usage of Microsoft.Extensions.Logging #1504

Closed
roji opened this Issue Mar 21, 2017 · 5 comments

Comments

Projects
None yet
4 participants
@roji
Member

roji commented Mar 21, 2017

Npgsql 3.2 switched to using Microsoft.Extensions.Logging. Since that package depends on netstandard, when used in projects targeting .NET Framework a lot of useless type-forwarding nugets are installed. Besides being annoying, this created some issues (such as this one).

After receiving many complaints, thinking about this and also considering LibLog as an alternative, Npgsql 3.2.2 will simply be rolling back to 3.1's custom logging implementation. While LibLog is the right approach, the library isn't quite in a place where it can be used right away (no netstandard support although in progress, some performance issues).

Bottom line, there simply isn't enough value in Microsoft.Extensions.Logging (or other solutions) over 3.1's custom logging approach. We can reevaluate for 3.3 based on user feedback.

@roji roji added this to the 3.2.2 milestone Mar 21, 2017

@roji roji self-assigned this Mar 21, 2017

@roji roji closed this in e125922 Mar 21, 2017

roji added a commit that referenced this issue Mar 21, 2017

Roll back logging to 3.1
Remove usage of Microsoft.Extensions.Logging, reintroduce
Npgsql 3.1's custom logging solution.

Closes #1504
@damianh

This comment has been minimized.

Show comment
Hide comment
@damianh

damianh Mar 21, 2017

I think this is the right approach.

Thanks for the feedback on LibLog, working on it. Hopefully it will meet your expectations shortly.

damianh commented Mar 21, 2017

I think this is the right approach.

Thanks for the feedback on LibLog, working on it. Hopefully it will meet your expectations shortly.

@roji

This comment has been minimized.

Show comment
Hide comment
@roji

roji Mar 21, 2017

Member

Thanks @damianh. FYI I'm doing this mainly because I unfortunately won't have a lot of time in the near future (intensive project), and so it's important to provide a satisfactory solution right now. I definitely think yours is the right approach.

Member

roji commented Mar 21, 2017

Thanks @damianh. FYI I'm doing this mainly because I unfortunately won't have a lot of time in the near future (intensive project), and so it's important to provide a satisfactory solution right now. I definitely think yours is the right approach.

@vincentparrett

This comment has been minimized.

Show comment
Hide comment
@vincentparrett

vincentparrett Mar 21, 2017

Thanks, this is very much appreciated (along with all the other the work you do on npgsql!).

Thanks, this is very much appreciated (along with all the other the work you do on npgsql!).

@AuthorProxy

This comment has been minimized.

Show comment
Hide comment
@AuthorProxy

AuthorProxy Mar 23, 2018

Maybe should comment on docs that you shouldn't use http://www.npgsql.org/doc/logging.html because you already have default Microsoft.AspNetCore.* and Microsoft.Extensions.Logging which nlog can use without any custom providers

AuthorProxy commented Mar 23, 2018

Maybe should comment on docs that you shouldn't use http://www.npgsql.org/doc/logging.html because you already have default Microsoft.AspNetCore.* and Microsoft.Extensions.Logging which nlog can use without any custom providers

@roji

This comment has been minimized.

Show comment
Hide comment
@roji

roji Mar 23, 2018

Member

@AuthorProxy how do you mean? As this issue and the docs state, Npgsql requires a INpgsqlLoggingProvider as in Npgsql 3.1 to log anywhere (NLog or otherwise), Microsoft.Extensions.Logging is not supported.

Member

roji commented Mar 23, 2018

@AuthorProxy how do you mean? As this issue and the docs state, Npgsql requires a INpgsqlLoggingProvider as in Npgsql 3.1 to log anywhere (NLog or otherwise), Microsoft.Extensions.Logging is not supported.

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