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

Support inserting custom logging framework #282

Open
fredrikcarlbom opened this issue Feb 21, 2022 · 4 comments
Open

Support inserting custom logging framework #282

fredrikcarlbom opened this issue Feb 21, 2022 · 4 comments

Comments

@fredrikcarlbom
Copy link

Is your feature request related to a problem? Please describe.
We are considering using nHapi in our product but since it writes its logs using a custom log framework that is a drawback.

Describe the solution you'd like
Supporting Microsoft.Extensions.Logging.Abstractions.ILoggerFactory would be ideal the ideal solution. This would also require implementing a default LoggerFactory that behaves like the current logging does

Describe alternatives you've considered
Using the current framework with trace listeners and output using the same format as our application.

Additional context
This would require dropping NET 3.5 support since Standard 2.0/Framework 4.6.1 is required.

@milkshakeuk
Copy link
Member

milkshakeuk commented Feb 21, 2022

@fredrikcarlbom Sounds like an excellent idea to me, though as it stands at the moment there isn't an army of people to pick these feature requests up, interested in supporting such a feature request?

In regards to your idea, I like it, I don't think nhapi.base should take a direct dependency on Microsoft.Extensions.Logging.Abstractions it should probably have its own ILogger interface which would expose an api very similar if not identical to microsofts ILogger interface, it should have a simple base implementation which could even be a null logger similar to NullLogger.

There could then be a separate nhapi.extensions.logging package which would be a simple adaptor for microsoft.extensions.logging.

What do you think?

@duaneedwards @AMCN41R what do you think?

@fredrikcarlbom
Copy link
Author

@milkshakeuk Your solution sounds reasonable. I can't promise that I can help out with this or not, we have not made any final decision to go with nHapi.

@milkshakeuk
Copy link
Member

@milkshakeuk Your solution sounds reasonable. I can't promise that I can help out with this or not, we have not made any final decision to go with nHapi.

@fredrikcarlbom did you ever make a decision?

@milkshakeuk
Copy link
Member

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

No branches or pull requests

2 participants