Comments (10)
Hello @sBoff ,
Thank you very much by your feedback.
This seems an issue coming from log4net library itself, as the appender implementation is not a part of Microsoft.Extensions.Logging.Log4Net.AspNetCore nuget.
I'm sorry, my fault, but I don't know how to help you on that.
Can you raise the issue on the corresponding project instead?
Regards.
from microsoft.extensions.logging.log4net.aspnetcore.
Hi @huorswords,
The log4net implementation is fine. It works as expected in other applications. It is the implementation of Log4NetLogger that is causing the problem - specifically this line in the Log4NetLogger constructor:
log4net.Config.XmlConfigurator.Configure(loggerRepository, xmlElement);
I don't believe XmlConfigurator.Configure should not be called for each logger instance that is created. In a typical application, this method is called once at startup. When new loggers are created, this method is not called again. It is this method that causes the log file to be deleted/recreated and hence, wipes out any log entries created before the last instance of Log4NetLogger is created.
I'll put forth a pull request soon.
from microsoft.extensions.logging.log4net.aspnetcore.
Hi again,
Cool, thank you very much! I will wait for the pull request then.
Regards
from microsoft.extensions.logging.log4net.aspnetcore.
@huorswords, I've been trying to do a pull request for the last hour with little success. I can connect to github and authenticate but it always returns the following when I try to push.
ERROR: Permission to huorswords/Microsoft.Extensions.Logging.Log4Net.AspNetCore.git denied to sBoff.
fatal: Could not read from remote repository.Please make sure you have the correct access rights
and the repository exists.
Are there some permissions you need to grant me, or something obvious you know I would be doing wrong?
Regards.
from microsoft.extensions.logging.log4net.aspnetcore.
I ended up having to fork this repository, create the fix, and then do a pull request from my fork to this repo. Is that the normal way? I would have expected to be able to create a branch and do a pull request directly from this repo?
from microsoft.extensions.logging.log4net.aspnetcore.
Hello @sBoff ,
Yes, I think that Fork flow is the default flow on Github repos by default. I didn't change permissions from the beginning, and also I do not include yet the Contributing document on the repo.
My fault, sorry.
Thank you very much by your contribution.
from microsoft.extensions.logging.log4net.aspnetcore.
Thanks @huorswords, I didn't realize forking was the default flow, all sorted now 👍
from microsoft.extensions.logging.log4net.aspnetcore.
Merged!
Thank you very much. I will schedule the master release as soon as possible.
Thank you very much again, @sBoff .
from microsoft.extensions.logging.log4net.aspnetcore.
Hi @sBoff ,
Just to let you know. Your changes are available on the 2.0.3 version of the nuget package.
Thank you. Regards,
from microsoft.extensions.logging.log4net.aspnetcore.
@huorswords, amazing, thanks very much :)
from microsoft.extensions.logging.log4net.aspnetcore.
Related Issues (20)
- Missing Release Notes HOT 2
- Use it in a windows service console application HOT 1
- How to add SMTPAppender HOT 1
- Logging to different Log4Net loggers with dependency injection HOT 1
- Question about name HOT 3
- Thank you for the contribution.
- Does this work with .NET or .NET Core applications? HOT 1
- .net 7 HOT 2
- Need Example Logging Facade Use Outside of ASP HOT 2
- Enable internal debugging HOT 1
- Add .NET 8 support HOT 2
- Missing copyright notice in license
- Upgrading to net8.0 throws exception on startup. HOT 1
- Initialize without a config file HOT 1
- microsoft.extensions.logging.log4net.aspnetcore is missing NuGet package README file
- .NET8.0 XML Exception Problem HOT 4
- EventId Not Showing in Logs
- Logging latest scope value
- How do I configure log4net from in memory configuration xml element? HOT 1
- Any plan to upgrade log4net to 2.0.16 or later?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from microsoft.extensions.logging.log4net.aspnetcore.