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 log4net integration on .NET Core #201

Closed
jonorossi opened this issue Jul 12, 2016 · 7 comments
Closed

Support log4net integration on .NET Core #201

jonorossi opened this issue Jul 12, 2016 · 7 comments
Milestone

Comments

@jonorossi
Copy link
Member

This will miss the cut for v4.0 because log4net still doesn't support .NET Core: https://github.com/apache/log4net/pull/16

@mtraudt
Copy link

mtraudt commented Dec 7, 2016

There is now a version of log4net (2.0.6) that targets netstandard1.3: https://www.nuget.org/packages/log4net-core-preview/

@jonorossi
Copy link
Member Author

@mtraudt that package looks to be published by a third party and is not supported by the upstream project.

@iluzyanin
Copy link

The official package with .Net core support is there now: https://www.nuget.org/packages/log4net/2.0.6

@jonorossi jonorossi added this to the v4.0 milestone Jan 9, 2017
@jonorossi
Copy link
Member Author

log4net 2.0.7 was released on January 5th to fix the NuGet package dependencies being wrong.

I've attempted to add support for .NET Core with our log4net integration, however I ran into the following problems with the .NET Core build:

  • XmlConfigurator.Configure and XmlConfigurator.ConfigureAndWatch now require a log4net.Repository.ILoggerRepository
  • LogManager.GetLogger needs a repository name or repository assembly
  • LogManager.GetRepository needs a repository name or repository assembly

I ran out of time to implement this myself and I don't use it myself. This issue is already tagged up-for-grabs, so a pull request is welcomed and we can make another release.

If someone wants to pick this up you'll need to add the xproj back to the NetCore solution and edit the project.json for the unit test project to reference the log4net project and remove the file exclusion.

@jonorossi jonorossi removed this from the v4.0 milestone Jan 24, 2017
@ghost
Copy link

ghost commented May 9, 2017

@jonorossi - I can verify this, I ran into the same issues. What are your thoughts on how you want to inject the repository? I cheated with some default repository hack. Would be happy to fish it out and submit a PR for this.

@jonorossi
Copy link
Member Author

What are your thoughts on how you want to inject the repository? I cheated with some default repository hack. Would be happy to fish it out and submit a PR for this.

I really can't remember any of it, happy to review a pull request.

@snakefoot
Copy link
Contributor

Created PR #340

@jonorossi jonorossi added this to the vNext milestone Apr 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants