aws / aws-xray-sdk-dotnet

The official AWS X-Ray SDK for .NET.
Apache License 2.0
110 stars 64 forks source link

Support for a logging framework other than Log4Net #148

Open doug-ferris-mondo opened 4 years ago

doug-ferris-mondo commented 4 years ago

At the moment, based on the README logging on .NET Core only supports log4net.

Based on the github page for log4net:

Apache Log4net was voted to dormant status on April 1, 2020. Dormant status indicates that the project is not being actively maintained, that no future releases are planned and, most likely, there are few or no developers left in the Apache Logging project familiar with this code base.

Given this is no longer being maintained, can this be moved to a more generic logging framework?

Can I suggest finding some way to support a generic ILogger from Microsoft.Extensions.Logging? Even if this means implementing a logger rather than having a logger injected into it, just feels like a nicer long-term option.

lupengamzn commented 4 years ago

Hi @doug-ferris,

Thanks for the feedback.

This request has already been put in our backlog, which will be investigated soon. Please stay tuned and come back later to check.

julealgon commented 3 years ago

I was going to create an issue regarding the use of a custom internal ILogger in the XRay middleware:

image

I was really surprised when I found out you were not using the native interface from Microsoft.Extensions.Logging in there.

Log4net is a very legacy logging library in the .Net ecosystem at this point and would be a poor choice if picking one library was even needed. The fact that it is a static instance is also really bad for any integrations. You could just inject ILogger<T> in the middleware constructor instead.

Do you have any updates on this @lupengamzn ?